lopsided98 / nix-ros-overlay

ROS overlay for the Nix package manager
Apache License 2.0
192 stars 77 forks source link

rosbridge-library: Use PyMongo for BSON implementation #284

Closed hacker1024 closed 1 year ago

hacker1024 commented 1 year ago

https://github.com/RobotWebTools/rosbridge_suite/issues/198

[rosbridge_websocket-1] Traceback (most recent call last):
[rosbridge_websocket-1]   File "/nix/store/0clz8waa2p2hg4d2v1d43i9wfz1lfr7s-ros-env/lib/python3.10/site-packages/rosbridge_library/util/__init__.py", line 13, in <module>
[rosbridge_websocket-1]     bson.BSON
[rosbridge_websocket-1] AttributeError: module 'bson' has no attribute 'BSON'
[rosbridge_websocket-1] 
[rosbridge_websocket-1] During handling of the above exception, another exception occurred:
[rosbridge_websocket-1] 
[rosbridge_websocket-1] Traceback (most recent call last):
[rosbridge_websocket-1]   File "/nix/store/0clz8waa2p2hg4d2v1d43i9wfz1lfr7s-ros-env/lib/rosbridge_server/rosbridge_websocket", line 41, in <module>
[rosbridge_websocket-1]     from rosbridge_library.capabilities.advertise import Advertise
[rosbridge_websocket-1]   File "/nix/store/0clz8waa2p2hg4d2v1d43i9wfz1lfr7s-ros-env/lib/python3.10/site-packages/rosbridge_library/capabilities/advertise.py", line 37, in <module>
[rosbridge_websocket-1]     from rosbridge_library.internal.publishers import manager
[rosbridge_websocket-1]   File "/nix/store/0clz8waa2p2hg4d2v1d43i9wfz1lfr7s-ros-env/lib/python3.10/site-packages/rosbridge_library/internal/publishers.py", line 38, in <module>
[rosbridge_websocket-1]     from rosbridge_library.internal import message_conversion, ros_loader
[rosbridge_websocket-1]   File "/nix/store/0clz8waa2p2hg4d2v1d43i9wfz1lfr7s-ros-env/lib/python3.10/site-packages/rosbridge_library/internal/message_conversion.py", line 44, in <module>
[rosbridge_websocket-1]     from rosbridge_library.util import bson
[rosbridge_websocket-1]   File "/nix/store/0clz8waa2p2hg4d2v1d43i9wfz1lfr7s-ros-env/lib/python3.10/site-packages/rosbridge_library/util/__init__.py", line 15, in <module>
[rosbridge_websocket-1]     raise Exception(
[rosbridge_websocket-1] Exception: BSON installation does not support all necessary features. Please use the MongoDB BSON implementation. See: https://github.com/RobotWebTools/rosbridge_suite/issues/198
lopsided98 commented 1 year ago

I think this change should be made in rosdep. Gentoo and OpenEmbedded both specify pymongo already, and it looks like the Debian, Ubuntu and Fedora python3-bson package is also actually the one from pymongo. See: https://github.com/ros/rosdistro/blob/5e6be01880c4b57410bbeceabf7e22c96bc510b6/rosdep/python.yaml#L5086