python 3.8 issue
See original GitHub issueIssue Description
For a service that works perfectly under python3.7 fails under python 3.8:
Traceback (most recent call last):
File "/.tox/py38/bin/huey_consumer", line 8, in <module>
sys.exit(consumer_main())
File "/.tox/py38/lib/python3.8/site-packages/huey/bin/huey_consumer.py", line 51, in consumer_main
consumer.run()
File "/.tox/py38/lib/python3.8/site-packages/huey/consumer.py", line 404, in run
self.start()
File "/.tox/py38/lib/python3.8/site-packages/huey/consumer.py", line 373, in start
self.scheduler.start()
File "/.pyenv/versions/3.8.0/lib/python3.8/multiprocessing/process.py", line 121, in start
self._popen = self._Popen(self)
File "/.pyenv/versions/3.8.0/lib/python3.8/multiprocessing/context.py", line 224, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "/.pyenv/versions/3.8.0/lib/python3.8/multiprocessing/context.py", line 283, in _Popen
return Popen(process_obj)
File "/.pyenv/versions/3.8.0/lib/python3.8/multiprocessing/popen_spawn_posix.py", line 32, in __init__
super().__init__(process_obj)
File "/.pyenv/versions/3.8.0/lib/python3.8/multiprocessing/popen_fork.py", line 19, in __init__
self._launch(process_obj)
File "/.pyenv/versions/3.8.0/lib/python3.8/multiprocessing/popen_spawn_posix.py", line 47, in _launch
reduction.dump(process_obj, fp)
File "/.pyenv/versions/3.8.0/lib/python3.8/multiprocessing/reduction.py", line 60, in dump
ForkingPickler(file, protocol).dump(obj)
AttributeError: Can't pickle local object 'Consumer._create_process.<locals>._run'
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
What's New In Python 3.8 — Python 3.11.1 documentation
This article explains the new features in Python 3.8, compared to 3.7. ... A continue statement was illegal in the finally clause due...
Read more >Python 3.8 compatibility issue · Issue #374 · strawlab/python-pcl
I'm unable to install python-pcl in a python3.8 environment. I always got this error : ERROR: Command errored out with exit status 1:...
Read more >Issue with the installation of Python 3.8 with docker file
I am trying to update my CI Pipeline for git lab, but my pipeline keeps on failing because the docker in docker of...
Read more >Issues with Python versions instal… | Apple Developer Forums
Hi, I tried installing Python3.7.13 using brew utility and the same got intsalled successfully. However, there was another version of Python3.8.9 which was ......
Read more >When should you upgrade to Python 3.11?
The problems with a new major Python release ... If you're far enough behind, do a series of upgrades: 3.8, 3.9, 3.10, and...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I think it may be related: https://bugs.python.org/issue33884 – which was closed. I’d suggest making a small modification in your code to try and explicitly set the multiprocessing start mode to ‘fork’:
https://docs.python.org/3/library/multiprocessing.html#multiprocessing.set_start_method
You can put it alongside where you declare your
huey
instance.See also here: https://github.com/sphinx-doc/sphinx/issues/6803#issuecomment-554704033
Added workaround to consumer entry-point: bf002c85ae444954c3237fa4b056fbf9111448a1