ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A answers.ros.org
Ask Your Question
0

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 http://wiki.ros.org/kinetic/Installat... 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/config_yaml.py:74: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load 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>
    sys.exit(wstool.wstool_cli.wstool_main(sys.argv))
  File "/usr/local/lib/python3.9/site-packages/wstool/wstool_cli.py", line 174, in wstool_main
    return commands[command](args)
  File "/usr/local/lib/python3.9/site-packages/wstool/multiproject_cli.py", line 475, in cmd_init
    install_success = multiproject_cmd.cmd_install_or_update(
  File "/usr/local/lib/python3.9/site-packages/wstool/multiproject_cmd.py", line 414, in cmd_install_or_update
    work.run()
  File "/usr/local/lib/python3.9/site-packages/wstool/common.py", line 352, in run
    self.threads[i].start()
  File "/usr/local/Cellar/python@3.9/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/process.py", 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/context.py", 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/context.py", 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/popen_spawn_posix.py", line 32, in __init__
    super().__init__(process_obj)
  File "/usr/local/Cellar/python@3.9/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/popen_fork.py", line 19, in __init__
    self._launch(process_obj)
  File "/usr/local/Cellar/python@3.9/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/popen_spawn_posix.py", 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/reduction.py", 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
0

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

Comments

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

2 followers

Stats

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

Seen: 135 times

Last updated: Oct 19 '21