python-jenkins-developers team mailing list archive
-
python-jenkins-developers team
-
Mailing list archive
-
Message #00681
[Bug 1998146] Re: error in tox: AttributeError: Can't pickle local object 'time_limit.<locals>.capture_results'
Fix proposed to branch: master
Review: https://review.opendev.org/c/jjb/python-jenkins/+/865915
** Changed in: python-jenkins
Status: New => In Progress
--
You received this bug notification because you are a member of Python
Jenkins Developers, which is subscribed to Python Jenkins.
https://bugs.launchpad.net/bugs/1998146
Title:
error in tox: AttributeError: Can't pickle local object
'time_limit.<locals>.capture_results'
Status in Python Jenkins:
In Progress
Bug description:
on macos with python 3.8 "tox -e py38" fails with this error
==============================
Failed 1 tests - output below:
==============================
tests.test_jenkins_sockets.JenkinsRequestTimeoutTests.test_jenkins_open_no_timeout
----------------------------------------------------------------------------------
Captured traceback:
~~~~~~~~~~~~~~~~~~~
Traceback (most recent call last):
File "/Users/gdm/workspace/python-jenkins/master/tests/test_jenkins_sockets.py", line 42, in test_jenkins_open_no_timeout
time_limit(0.5, self.messages,
File "/Users/gdm/workspace/python-jenkins/master/tests/helper.py", line 50, in time_limit
p.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/context.py", line 224, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/context.py", line 284, in _Popen
return Popen(process_obj)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/popen_spawn_posix.py", line 32, in __init__
super().__init__(process_obj)
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
'time_limit.<locals>.capture_results'
according to https://stackoverflow.com/questions/72766345/attributeerror-cant-pickle-local-object-in-multiprocessing replacing multiprocessing by multiprocess could help
To manage notifications about this bug go to:
https://bugs.launchpad.net/python-jenkins/+bug/1998146/+subscriptions
References