Skip to content
This repository was archived by the owner on Jun 25, 2020. It is now read-only.
This repository was archived by the owner on Jun 25, 2020. It is now read-only.

Problem with python3.8: pickle / multiprocessing problem  #149

@jenisys

Description

@jenisys

Current versions 0.1.17, 0.1.18 and HEAD cause a problem if you install wstool with python 3.8.

HOW-TO-REPEAT:

$ git clone https://github.com/vcstools/wstool.git
$ cd wstool
$ python --version
Python 3.8.0
$ pip install .
...
Successfully installed wstool-0.1.18

$ cd .../into_directory_with_rosinstall_file
$ wstool
Traceback (most recent call last):
  File "/xxx/.venv_py38/bin/wstool", line 62, in <module>
    sys.exit(wstool.wstool_cli.wstool_main(sys.argv))
  File "/xxx/.venv_py38/lib/python3.8/site-packages/wstool/wstool_cli.py", line 185, in wstool_main
    return ws_commands[command](workspace, args)
  File "/xxx/.venv_py38/lib/python3.8/site-packages/wstool/multiproject_cli.py", line 1286, in cmd_info
    outputs = multiproject_cmd.cmd_info(config,
  File "/xxx/.venv_py38/lib/python3.8/site-packages/wstool/multiproject_cmd.py", line 545, in cmd_info
    outputs = work.run()
  File "/xxx/.venv_py38/lib/python3.8/site-packages/wstool/common.py", line 352, in run
    self.threads[i].start()
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/process.py", line 121, in start
    self._popen = self._Popen(self)
    ...
    File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/popen_fork.py", line 19, in __init__
    self._launch(process_obj)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/popen_spawn_posix.py", line 47, in _launch
    reduction.dump(process_obj, fp)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/reduction.py", line 60, in dump
    ForkingPickler(file, protocol).dump(obj)
AttributeError: Can't pickle local object 'cmd_info.<locals>.InfoRetriever'

NOTE: Same version of wstool works in python 2.7.16 and python 3.7.x without any problems.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions