im new to ros and i was going through the ros tutorials smoothly until tutorial 10. I dont get what is wrong

asked 2020-02-11 07:20:41 -0600

updated 2020-02-11 09:36:49 -0600

gvdhoorn gravatar image

Straight dump of error message:

askalany@youssef-HP:~/catkin_ws$ catkin_make install 
Base path: /home/askalany/catkin_ws
Source space: /home/askalany/catkin_ws/src
Build space: /home/askalany/catkin_ws/build
Devel space: /home/askalany/catkin_ws/devel
Install space: /home/askalany/catkin_ws/install
####
#### Running command: "make cmake_check_build_system" in "/home/askalany/catkin_ws/build"
####
####
#### Running command: "make install -j4 -l4" in "/home/askalany/catkin_ws/build"
####
[  0%] Built target std_msgs_generate_messages_eus
[  0%] Built target std_msgs_generate_messages_lisp
[  0%] Built target std_msgs_generate_messages_nodejs
[  0%] Built target std_msgs_generate_messages_py
[  0%] Built target std_msgs_generate_messages_cpp
[  0%] Built target _beginner_tutorials_generate_messages_check_deps_AddTwoInts
[  0%] Built target _beginner_tutorials_generate_messages_check_deps_Num
[  7%] Generating Python from MSG beginner_tutorials/Num
[ 23%] Built target beginner_tutorials_generate_messages_lisp
[ 38%] Built target beginner_tutorials_generate_messages_nodejs
[ 61%] Built target beginner_tutorials_generate_messages_eus
[ 69%] Generating Python code from SRV beginner_tutorials/AddTwoInts
[ 84%] Built target beginner_tutorials_generate_messages_cpp
Traceback (most recent call last):
  File "/opt/ros/kinetic/share/genpy/cmake/../../../lib/genpy/genmsg_py.py", line 44, in <module>
    import genpy.generator
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/genpy/__init__.py", line 34, in <module>
    from . message import Message, SerializationError, DeserializationError, MessageException, struct_I
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/genpy/message.py", line 44, in <module>
    import yaml
  File "/usr/lib/python2.7/dist-packages/yaml/__init__.py", line 2, in <module>
    from error import *
ImportError: No module named 'error'
Traceback (most recent call last):
  File "/opt/ros/kinetic/share/genpy/cmake/../../../lib/genpy/gensrv_py.py", line 43, in <module>
    import genpy.generator
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/genpy/__init__.py", line 34, in <module>
    from . message import Message, SerializationError, DeserializationError, MessageException, struct_I
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/genpy/message.py", line 44, in <module>
    import yaml
  File "/usr/lib/python2.7/dist-packages/yaml/__init__.py", line 2, in <module>
    from error import *
ImportError: No module named 'error'
beginner_tutorials/CMakeFiles/beginner_tutorials_generate_messages_py.dir/build.make:64: recipe for target '/home/askalany/catkin_ws/devel/lib/python3/dist-packages/beginner_tutorials/msg/_Num.py' failed
make[2]: *** [/home/askalany/catkin_ws/devel/lib/python3/dist-packages/beginner_tutorials/msg/_Num.py] Error 1
make[2]: *** Waiting for unfinished jobs....
beginner_tutorials/CMakeFiles/beginner_tutorials_generate_messages_py.dir/build.make:69: recipe for target '/home
/askalany/catkin_ws/devel/lib/python3/dist-packages/beginner_tutorials/srv/_AddTwoInts.py' failed
make[2]: *** [/home/askalany/catkin_ws/devel/lib/python3/dist-packages/beginner_tutorials/srv/_AddTwoInts.py] Error 1
CMakeFiles/Makefile2:603: recipe for target 'beginner_tutorials/CMakeFiles
/beginner_tutorials_generate_messages_py.dir/all' failed
make[1]: *** [beginner_tutorials/CMakeFiles/beginner_tutorials_generate_messages_py.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make install -j4 -l4" failed
edit retag flag offensive close merge delete

Comments

1
/home/askalany/catkin_ws/devel/lib/python3/dist-package/..

you appear to be mixing Python 2 and Python 3. That would be a problem and most likely the cause.

gvdhoorn gravatar imagegvdhoorn ( 2020-02-11 09:37:45 -0600 )edit