AttributeError: 'module' object has no attribute 'RosPack'

asked 2018-10-06 14:04:48 -0600

Medo BKB gravatar image

updated 2018-10-07 05:32:14 -0600

gvdhoorn gravatar image

please help me i don't know what i'm missing , when i run the tuto of client server i get this issue please help !!!!!

Traceback (most recent call last):
  File "/home/bxxmed/tuto_ws/src/rospkg_dem/scripts/add_two_ints_servertuto.py", line 4, in <module>
    import rospy
  File "/opt/ros/indigo/lib/python2.7/dist-packages/rospy/__init__.py", line 49, in <module>
    from .client import spin, myargv, init_node, \
  File "/opt/ros/indigo/lib/python2.7/dist-packages/rospy/client.py", line 52, in <module>
    import roslib
  File "/opt/ros/indigo/lib/python2.7/dist-packages/roslib/__init__.py", line 50, in <module>
    from roslib.launcher import load_manifest
  File "/opt/ros/indigo/lib/python2.7/dist-packages/roslib/launcher.py", line 48, in <module>
    _rospack = rospkg.RosPack()
AttributeError: 'module' object has no attribute 'RosPack'
edit retag flag offensive close merge delete

Comments

Not using Anaconda by any chance?

gvdhoorn gravatar image gvdhoorn  ( 2018-10-07 05:32:49 -0600 )edit

i figured out the problem i was doing catkin_make instead of catkin build , but i really don't know the difference between them !!!

Medo BKB gravatar image Medo BKB  ( 2018-10-07 07:47:45 -0600 )edit

That should not make any difference.

You did do a source /home/bxxmed/tuto_ws/devel/setup.bash before your rosrun rospkg_dem add_two_ints_servertuto.py, right?

gvdhoorn gravatar image gvdhoorn  ( 2018-10-07 08:21:12 -0600 )edit

yes sure , i did that one thing i did is i install python 2.7.14 without removing previous version , and i installed roboware studio , i don't know may be this cause this bug !!!

Medo BKB gravatar image Medo BKB  ( 2018-10-08 14:24:05 -0600 )edit