ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

wstool failed to initiate

asked 2021-10-16 04:50:19 -0500

tortoise_catfish gravatar image

I'm following this instruction trying to install ROS on my mac and I've got environment variables both set for python2.7 and python 3.9 by calling:

$ mkdir -p ~/Library/Python/2.7/lib/python/site-packages
$ echo "$(brew --prefix)/lib/python2.7/site-packages" >> ~/Library/Python/2.7/lib/python/site-packages/homebrew.pth
$ mkdir -p ~/Library/Python/3.9/lib/python/site-packages
$ echo "$(brew --prefix)/lib/python3.9/site-packages" >> ~/Library/Python/3.9/lib/python/site-packages/homebrew.pth

I have successfully generated the install file by calling: rosinstall_generator desktop --rosdistro kinetic --deps --wet-only --tar > kinetic-desktop-wet.rosinstall but when I try to init the install file using wstool it is giving me the following errors:

Using initial elements from: kinetic-desktop-wet.rosinstall
/usr/local/lib/python3.9/site-packages/wstool/ YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read for full details.
  yamldata = yaml.load(stream)
Writing /Users/nelldu/ros_catkin_ws/src/.rosinstall
Traceback (most recent call last):
  File "/usr/local/bin/wstool", line 62, in <module>
  File "/usr/local/lib/python3.9/site-packages/wstool/", line 174, in wstool_main
    return commands[command](args)
  File "/usr/local/lib/python3.9/site-packages/wstool/", line 475, in cmd_init
    install_success = multiproject_cmd.cmd_install_or_update(
  File "/usr/local/lib/python3.9/site-packages/wstool/", line 414, in cmd_install_or_update
  File "/usr/local/lib/python3.9/site-packages/wstool/", line 352, in run
  File "/usr/local/Cellar/python@3.9/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/", line 121, in start
    self._popen = self._Popen(self)
  File "/usr/local/Cellar/python@3.9/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/", line 224, in _Popen
    return _default_context.get_context().Process._Popen(process_obj)
  File "/usr/local/Cellar/python@3.9/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/", line 284, in _Popen
    return Popen(process_obj)
  File "/usr/local/Cellar/python@3.9/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/", line 32, in __init__
  File "/usr/local/Cellar/python@3.9/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/", line 19, in __init__
  File "/usr/local/Cellar/python@3.9/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/", line 47, in _launch
    reduction.dump(process_obj, fp)
  File "/usr/local/Cellar/python@3.9/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/", line 60, in dump
    ForkingPickler(file, protocol).dump(obj)
AttributeError: Can't pickle local object 'cmd_install_or_update.<locals>.Installer'

Would like to know is this a yaml issue that I have to update my yaml ... (more)

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2021-10-19 08:23:37 -0500

osilva gravatar image

By using Python 2 and Python 3 at the same time, there is a conflict with pickle.

Optional keyword arguments are fix_imports, encoding and errors, which are used to control compatibility support for pickle stream generated by Python 2. If fix_imports is true, pickle will try to map the old Python 2 names to the new names used in Python 3. The encoding and errors tell pickle how to decode 8-bit string instances pickled by Python 2; these default to ‘ASCII’ and ‘strict’, respectively. The encoding can be ‘bytes’ to read these 8-bit string instances as bytes objects.

Check this stackoverflow discussion as this may not be related to wstool but how it's being used.

edit flag offensive delete link more


I have already made sure that I followed the steps with Python 3.9 as well though the instructions are written for 2.7 and haven't been updated for almost a year.

Fwiw it says kinetic did not work on mac os I'm currently installing melodic with vcs and it seems to be going alright though I have to constantly solve for dependency issues and CMakeLists.txt files.

tortoise_catfish gravatar image tortoise_catfish  ( 2021-10-19 10:28:27 -0500 )edit

Hope that solves the issues. Cheers

osilva gravatar image osilva  ( 2021-10-19 20:12:09 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2021-10-16 04:50:19 -0500

Seen: 135 times

Last updated: Oct 19 '21