AttributeError: 'OSError' object has no attribute 'message'

asked 2021-06-08 11:12:06 -0600

regoGr gravatar image

I'm trying to install MoveIt and follow the instructions: https://ros-planning.github.io/moveit...
But when I did catkin config --extend /opt/ros/${ROS_DISTRO} --cmake-args -DCMAKE_BUILD_TYPE=Release> I receive the error:
Traceback (most recent call last): File "/usr/lib/python3/dist-packages/catkin_tools/verbs/catkin_config/cli.py", line 144, in main context = Context.load( File "/usr/lib/python3/dist-packages/catkin_tools/context.py", line 247, in load ctx.load_env() File "/usr/lib/python3/dist-packages/catkin_tools/context.py", line 442, in load_env extended_env = get_resultspace_environment(self.extend_path, quiet=False) File "/usr/lib/python3/dist-packages/catkin_tools/resultspace.py", line 93, in get_resultspace_environment raise IOError( OSError: Cannot load environment from resultspace "/opt/ros" because it does not appear to be a catkin-generated resultspace (missing .catkin marker file).

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/bin/catkin", line 11, in <module> load_entry_point('catkin-tools==0.5.0', 'console_scripts', 'catkin')() File "/usr/lib/python3/dist-packages/catkin_tools/commands/catkin.py", line 272, in main catkin_main(sysargs) File "/usr/lib/python3/dist-packages/catkin_tools/commands/catkin.py", line 267, in catkin_main sys.exit(args.main(args) or 0) File "/usr/lib/python3/dist-packages/catkin_tools/verbs/catkin_config/cli.py", line 167, in main print('error: could not configure catkin workspace: %s' % exc.message) AttributeError: 'OSError' object has no attribute 'message'
This error is about python? What's wrong with that? I found this solution: https://github.com/ethz-asl/voxblox-p... but I haven't Anaconda on my notebook.

I tried to change code in file cli.py on line 167. I chanced "message" to "msg". It didn't work.

edit retag flag offensive close merge delete

Comments

I have python 3.8.5 on my machine.

regoGr gravatar image regoGr  ( 2021-06-08 11:13:47 -0600 )edit

Did you source ROS (source /opt/ros/noetic/setup.bash)? The command that failed assumes $ROS_DISTRO is defined. You can check with echo $ROS_DISTRO. In your case, it should return noetic.

tryan gravatar image tryan  ( 2021-06-08 13:24:14 -0600 )edit

Thank you! It helped me.
May be we need to add in tutorial this point about source for begginers.

regoGr gravatar image regoGr  ( 2021-06-08 13:30:24 -0600 )edit

It's technically in the Environment Setup part of the ROS installation instructions, to which the tutorial refers, but I can see how it would be an easy point to miss. If you have an idea of how to improve the tutorial, I suggest opening an issue (better yet, a pull request) with them.

tryan gravatar image tryan  ( 2021-06-08 14:12:05 -0600 )edit