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

Installing ros-noetic-rosbridge-server misses bson dependency #184

Closed
ruben-arts opened this issue Nov 2, 2021 · 3 comments · Fixed by #186
Closed

Installing ros-noetic-rosbridge-server misses bson dependency #184

ruben-arts opened this issue Nov 2, 2021 · 3 comments · Fixed by #186

Comments

@ruben-arts
Copy link
Contributor

After installing rosbridge-server with Conda, you will get issues with the bson dependency.

When trying to run the rosbridge-server you will be missing the bson module.

Error log:
 Log opened.
 Traceback (most recent call last):
   File "/home/mamba/bson-test/.env/lib/rosbridge_server/rosbridge_websocket", line 48, in <module>
     from rosbridge_server import ClientManager
   File "/home/mamba/bson-test/.env/lib/python3.8/site-packages/rosbridge_server/__init__.py", line 2, in <module>
     from .websocket_handler import RosbridgeWebSocket
  File "/home/mamba/bson-test/.env/lib/python3.8/site-packages/rosbridge_server/websocket_handler.py", line 49, in <module>
     from rosbridge_library.rosbridge_protocol import RosbridgeProtocol
   File "/home/mamba/bson-test/.env/lib/python3.8/site-packages/rosbridge_library/rosbridge_protocol.py", line 34, in <module>
     from rosbridge_library.protocol import Protocol
   File "/home/mamba/bson-test/.env/lib/python3.8/site-packages/rosbridge_library/protocol.py", line 43, in <module>
     from rosbridge_library.util import json, bson
   File "/home/mamba/bson-test/.env/lib/python3.8/site-packages/rosbridge_library/util/__init__.py", line 19, in <module>
     import bson
ModuleNotFoundError: No module named 'bson'

This issue is known and the fix would be installing the pymongo library.

So the workaround for now is installing pymongo :

pip install pymongo
# OR 
conda install -c conda-forge pymongo

Could this be added as a dependency?

@wolfv
Copy link
Member

wolfv commented Nov 2, 2021

Hi, thanks for discovering this! Yes, indeed, that seems like the proper fix!

We can add dependencies in patch/dependencies.yaml file. Do you want to send a PR?

@ruben-arts
Copy link
Contributor Author

Oh after making that PR I see I miss read your suggestion. Would it be enough to add a instance of rosbridge-library to the dependencies.yaml ?

@wolfv
Copy link
Member

wolfv commented Nov 2, 2021

yes, just adding that to dependencies.yaml should be enough. I think your way also unfortunately doesn't work because we generate the recipes before we're patching them :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants