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

module 'genpy' has no attribute 'Message' #8

Open
PaulBigiel opened this issue Mar 12, 2024 · 1 comment
Open

module 'genpy' has no attribute 'Message' #8

PaulBigiel opened this issue Mar 12, 2024 · 1 comment

Comments

@PaulBigiel
Copy link

When trying to launch the conversion script to nuscenes, I get the following error:

(tum-traffic-dataset-dev-kit) paul@paul-B450NH:~/tum-traffic-dataset-dev-kit$ python src/label_conversion/conversion_openlabel_to_nuscenes.py --root-path r02_sequences_split \ --out-dir innuscenes
Traceback (most recent call last):
File "/home/paul/tum-traffic-dataset-dev-kit/src/label_conversion/conversion_openlabel_to_nuscenes.py", line 5, in
from pypcd import pypcd # solution to correctly installing this :dimatura/pypcd#28
File "/home/paul/miniconda3/envs/tum-traffic-dataset-dev-kit/lib/python3.9/site-packages/pypcd/pypcd.py", line 20, in
from sensor_msgs.msg import PointField
File "/home/paul/miniconda3/envs/tum-traffic-dataset-dev-kit/lib/python3.9/site-packages/sensor_msgs/msg/init.py", line 1, in
from ._BatteryState import *
File "/home/paul/miniconda3/envs/tum-traffic-dataset-dev-kit/lib/python3.9/site-packages/sensor_msgs/msg/_BatteryState.py", line 8, in
import std_msgs.msg
File "/home/paul/miniconda3/envs/tum-traffic-dataset-dev-kit/lib/python3.9/site-packages/std_msgs/msg/init.py", line 1, in
from ._Bool import *
File "/home/paul/miniconda3/envs/tum-traffic-dataset-dev-kit/lib/python3.9/site-packages/std_msgs/msg/_Bool.py", line 9, in
class Bool(genpy.Message):
AttributeError: module 'genpy' has no attribute 'Message'

Could it be that the conda installs a wrong version of genpy?

@Mike-7777777
Copy link

Mike-7777777 commented May 2, 2024

It's caused by wrong version of std_msgs. You do not need to install genpy, this will only cause more mess. You can fix it by install the ros-sensor-msgs:

conda install conda-forge::ros-sensor-msgs

You can try the dockerfile I wrote, I just pulled a resquest, you can check it #10.

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

No branches or pull requests

2 participants