Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError: sys.meta_path is None, Python is likely shutting down #58

Open
rnbguy opened this issue May 30, 2022 · 1 comment
Open

Comments

@rnbguy
Copy link
Member

rnbguy commented May 30, 2022

I am getting the following error on Python 3.10,

Exception ignored in: <function Pool.__del__ at 0x7fcbcb5e9630>
Traceback (most recent call last):
  File "/home/XXXX/.cache/pypoetry/virtualenvs/modelator-py-5E8ZuFvv-py3.10/lib/python3.10/site-packages/multiprocess/pool.py", line 268, in __del__
  File "/home/XXXX/.cache/pypoetry/virtualenvs/modelator-py-5E8ZuFvv-py3.10/lib/python3.10/site-packages/multiprocess/queues.py", line 375, in put
  File "/home/XXXX/.cache/pypoetry/virtualenvs/modelator-py-5E8ZuFvv-py3.10/lib/python3.10/site-packages/multiprocess/reduction.py", line 54, in dumps
  File "/home/XXXX/.cache/pypoetry/virtualenvs/modelator-py-5E8ZuFvv-py3.10/lib/python3.10/site-packages/multiprocess/reduction.py", line 42, in __init__
  File "/home/XXXX/.cache/pypoetry/virtualenvs/modelator-py-5E8ZuFvv-py3.10/lib/python3.10/site-packages/dill/_dill.py", line 573, in __init__
ImportError: sys.meta_path is None, Python is likely shutting down

the problem goes away when I switch from pathos.multiprocessing to in-built multiprocessing library.

@danwt is there any specific reason you were using pathos?

@danwt
Copy link
Contributor

danwt commented Jun 6, 2022

Hey, I think there was! I can't remember the precise details but it was something to do with multiprocessing and pickling.

I think default python multiprocessing might require default pickling but many things cannot be easily pickled. Many people suggested to avoid the built in multiprocessing and use a library. I think pathos handled everything easily.

https://stackoverflow.com/questions/8804830/python-multiprocessing-picklingerror-cant-pickle-type-function

Btw, I see your using Python 3.10. Are you sure it won't cause problems. I think the project is for 3.9.9 and there was a good reason for that, which I can't remember :/ I think the reason might have been related to this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants