ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

AttributeError: module 'genpy' has no attribute 'Message'

asked 2020-07-28 16:30:40 -0500

asifbhatti gravatar image

updated 2020-07-29 03:52:48 -0500

gvdhoorn gravatar image

Why i am getting this error:

Traceback (most recent call last):
  File "/home/asif/catkin_ws/src/beginner_tutorials/src/scripts/talker.py", line 39, in <module>
    import rospy
  File "/opt/ros/melodic/lib/python2.7/dist-packages/rospy/__init__.py", line 47, in <module>
    from std_msgs.msg import Header
  File "/opt/ros/melodic/lib/python2.7/dist-packages/std_msgs/msg/__init__.py", line 1, in <module>
    from ._Bool import *
  File "/opt/ros/melodic/lib/python2.7/dist-packages/std_msgs/msg/_Bool.py", line 9, in <module>
    class Bool(genpy.Message):
AttributeError: module 'genpy' has no attribute 'Message'

when i try to run simple talker code on ros melodic installed in my nvidia jetson nano?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-07-28 16:55:02 -0500

asifbhatti gravatar image

I got the solution by, reinstalling as below:

sudo apt-get install --reinstall python-genpy

sudo apt-get install --reinstall ros-melodic-genpy

now i am not getting that error.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2020-07-28 16:30:09 -0500

Seen: 1,792 times

Last updated: Jul 29 '20