You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
rosbag has added support for encryption in melodic, which brings in a python dependency on Crypto, which @mikaelarguedas noticed was causing issues building the bridge on bionic, even if the Crypto dependency is installed in the virtualenv on CI:
--- stderr: ros1_bridge
Traceback (most recent call last):
File "bin/ros1_bridge_generate_factories", line 11, in <module>
from ros1_bridge import generate_cpp
File "/home/rosbuild/ci_scripts/ws/src/ros2/ros1_bridge/ros1_bridge/__init__.py", line 82, in <module>
import rosmsg # noqa
File "/opt/ros/melodic/lib/python2.7/dist-packages/rosmsg/__init__.py", line 54, in <module>
import rosbag
File "/opt/ros/melodic/lib/python2.7/dist-packages/rosbag/__init__.py", line 33, in <module>
from .bag import Bag, Compression, ROSBagException, ROSBagFormatException, ROSBagUnindexedException
File "/opt/ros/melodic/lib/python2.7/dist-packages/rosbag/bag.py", line 53, in <module>
from Crypto import Random
ModuleNotFoundError: No module named 'Crypto'
make[2]: *** [generated/get_factory.cpp] Error 1
This is complicated in the case of the bridge because we need to import rosmsg dependencies using python2:
--- stderr: ros1_bridge
Traceback (most recent call last):
File "bin/ros1_bridge_generate_factories", line 11, in <module>
from ros1_bridge import generate_cpp
File "/home/rosbuild/ci_scripts/ws/src/ros2/ros1_bridge/ros1_bridge/__init__.py", line 100, in <module>
import rosmsg # noqa
File "/opt/ros/melodic/lib/python2.7/dist-packages/rosmsg/__init__.py", line 54, in <module>
import rosbag
File "/opt/ros/melodic/lib/python2.7/dist-packages/rosbag/__init__.py", line 33, in <module>
from .bag import Bag, Compression, ROSBagException, ROSBagFormatException, ROSBagUnindexedException
File "/opt/ros/melodic/lib/python2.7/dist-packages/rosbag/bag.py", line 53, in <module>
from Crypto import Random
File "/usr/lib/python2.7/dist-packages/Crypto/Random/__init__.py", line 28, in <module>
from Crypto.Random import OSRNG
File "/usr/lib/python2.7/dist-packages/Crypto/Random/OSRNG/__init__.py", line 32, in <module>
from Crypto.Random.OSRNG.posix import new
File "/usr/lib/python2.7/dist-packages/Crypto/Random/OSRNG/posix.py", line 66
except IOError, e:
^
SyntaxError: invalid syntax
make[2]: *** [generated/get_factory.cpp] Error 1
I can keep working around this, but wanted to ask @dirk-thomas if it is possible to instead not import rosbag globally upon import of rosmsg? or to only import Crypto locally inside rosbag, instead? I think then we wouldn't have to modify any import code in the bridge to work around it.
The text was updated successfully, but these errors were encountered:
rosbag has added support for encryption in melodic, which brings in a python dependency on Crypto, which @mikaelarguedas noticed was causing issues building the bridge on bionic, even if the Crypto dependency is installed in the virtualenv on CI:
This is complicated in the case of the bridge because we need to import
rosmsg
dependencies using python2:ros1_bridge/ros1_bridge/__init__.py
Line 31 in ca30494
and
rosbag
is arosmsg
dependency.I have gotten around the Crypto importing issue by importing Crypto using the same workaround as for other dependencies, but it just gets one step closer:
I can keep working around this, but wanted to ask @dirk-thomas if it is possible to instead not import rosbag globally upon import of rosmsg? or to only import Crypto locally inside rosbag, instead? I think then we wouldn't have to modify any import code in the bridge to work around it.
The text was updated successfully, but these errors were encountered: