Closed sachingooo closed 2 years ago
Hi @sachingooo
Thanks for using pyaf.
This seems to be an issue with python multiprocessing under windows. Could you please try the fix described here :
https://stackoverflow.com/questions/18204782/runtimeerror-on-windows-trying-python-multiprocessing
Hello @antoinecarme @sachingooo - I'm having the same issue on MacOS
@olivernash
For people running into this problem using mac, Python 3.8 on MacOS by default now uses spawn instead of fork as start method for new processes.
Try with:
multiprocessing.set_start_method("fork")
@Roemer-de-Ruiter
Thanks a lot for the feedback. Python 3.9 still has some issues with multiprocessing on Windows and MacOS. these issues are related to spawn/fork methods.
Were you able to try this fix on MacOS (I am only a linux user) ? A copy-paste of the log of this script is welcome :
https://github.com/antoinecarme/pyaf/blob/master/tests/func/test_ozone.py
@antoinecarme
I was able to fix it on macOS by setting the multiprocessing method to 'fork' as described above. As far as the log script of test_ozone.py I get the exact same results as the one in the question issued by @sachingooo.
This issue is limited to Windows/MacOS and impacts all python3 multiprocessing users (external python bug).
Linux is OK => No significant impact on cloud users.
Added a python bug with a minimal example of how to reproduce this issue.
Following @arhadthedev recommendation, using if __name__ == '__main__'
is mandatory for windows users, test scripts work without it for linux.
https://github.com/python/cpython/issues/91573#issuecomment-1100207553
I will adapt the demo script to reflect this in the README.md file on the main page. (confirmations are welcome).
Demo script updated.
Fixed.
I have pyaf installed and am attempted to run the example code over at https://pypi.org/project/pyaf/
Here's the code:
It fails on the last line with this error trace, multiple times (repeatedly, until I stop it):