Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moving ovos-bus-client to requirements.txt? #137

Closed
goldyfruit opened this issue May 1, 2023 · 2 comments · Fixed by #138
Closed

Moving ovos-bus-client to requirements.txt? #137

goldyfruit opened this issue May 1, 2023 · 2 comments · Fixed by #138

Comments

@goldyfruit
Copy link
Member

goldyfruit commented May 1, 2023

I got this error on a fresh installed container, I think ovos-bus-client should be part of requirements.txt and not only extras.txt.

Uncaught exception GET /core (127.0.0.1)
HTTPServerRequest(protocol='http', host='0.0.0.0:8181', method='GET', uri='/core', version='HTTP/1.1', remote_ip='127.0.0.1')
Traceback (most recent call last):
  File "/home/ovos/.venv/lib/python3.11/site-packages/ovos_utils/messagebus.py", line 160, in __new__
    from mycroft_bus_client import Message as _M
ModuleNotFoundError: No module named 'mycroft_bus_client'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/ovos/.venv/lib/python3.11/site-packages/tornado/websocket.py", line 937, in _accept_connection
    open_result = handler.open(*handler.open_args, **handler.open_kwargs)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ovos/.venv/lib/python3.11/site-packages/ovos_messagebus/event_handler.py", line 55, in open
    self.write_message(Message("connected").serialize())
                       ^^^^^^^^^^^^^^^^^^^^
  File "/home/ovos/.venv/lib/python3.11/site-packages/ovos_utils/messagebus.py", line 163, in __new__
    return super().__new__(cls, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: object.__new__() takes exactly one argument (the type to instantiate)

ovos-messagebus, requires ovos-utils which requires ovos-bus-client in here, not sure we want to keep installing mycroft-messagebus-client everywhere.

@JarbasAl
Copy link
Member

JarbasAl commented May 1, 2023

will look into that issue, but some clarifications

  • mycroft-bus-client is being removed from ovos ecosystem completely
  • the import you inked is conditional and only for backwards compat
  • ovos-utils can not depend on any other ovos package, it is the common shared library
  • if we added ovos-bus-client it would introduce a circular dependency
  • ovos-bus-client should be a dependency of whatever caused that error above, but not ovos-utils
  • ovos-bus-client needs to be present in all containers for sure, as thats what allows them to connect to each other
  • the error is because neither mycroft nor ovos bus client are installed, it still should have handled that case, you found a bug there

@goldyfruit
Copy link
Member Author

will look into that issue, but some clarifications

  • mycroft-bus-client is being removed from ovos ecosystem completely
  • the import you inked is conditional and only for backwards compat
  • ovos-utils can not depend on any other ovos package, it is the common shared library
  • if we added ovos-bus-client it would introduce a circular dependency
  • ovos-bus-client should be a dependency of whatever caused that error above, but not ovos-utils
  • ovos-bus-client needs to be present in all containers for sure, as thats what allows them to connect to each other
  • the error is because neither mycroft nor ovos bus client are installed, it still should have handled that case, you found a bug there

I see, then I guess, ovos-messagebus could have ovos-bus-client as a requirement.

Thanks

JarbasAl added a commit that referenced this issue May 1, 2023
```
Uncaught exception GET /core (127.0.0.1)
HTTPServerRequest(protocol='http', host='0.0.0.0:8181', method='GET', uri='/core', version='HTTP/1.1', remote_ip='127.0.0.1')
Traceback (most recent call last):
  File "/home/ovos/.venv/lib/python3.11/site-packages/ovos_utils/messagebus.py", line 160, in __new__
    from mycroft_bus_client import Message as _M
ModuleNotFoundError: No module named 'mycroft_bus_client'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/ovos/.venv/lib/python3.11/site-packages/tornado/websocket.py", line 937, in _accept_connection
    open_result = handler.open(*handler.open_args, **handler.open_kwargs)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ovos/.venv/lib/python3.11/site-packages/ovos_messagebus/event_handler.py", line 55, in open
    self.write_message(Message("connected").serialize())
                       ^^^^^^^^^^^^^^^^^^^^
  File "/home/ovos/.venv/lib/python3.11/site-packages/ovos_utils/messagebus.py", line 163, in __new__
    return super().__new__(cls, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: object.__new__() takes exactly one argument (the type to instantiate)
```

closes #137

explanation https://stackoverflow.com/questions/59217884/new-method-giving-error-object-new-takes-exactly-one-argument-the-typ
@JarbasAl JarbasAl mentioned this issue May 1, 2023
@github-actions github-actions bot mentioned this issue Jun 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants