Error with multiprocessing with Thonny 3.3.13 under Windows10
See original GitHub issueRunning this code fails.
import multiprocessing
def y(x):
print(x)
if __name__ == '__main__':
f = multiprocessing.Process(target = y, args=('a'))
f.start()
f.join()
Errors:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Program Files (x86)\Thonny\lib\multiprocessing\spawn.py", line 105, in spawn_main
exitcode = _main(fd)
File "C:\Program Files (x86)\Thonny\lib\multiprocessing\spawn.py", line 115, in _main
self = reduction.pickle.load(from_parent)
AttributeError: Can't get attribute 'y' on <module '__main__' (built-in)>
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
RuntimeError on windows trying python multiprocessing
RuntimeError: Attempt to start a new process before the current process has finished its bootstrapping phase. This probably means that you are ......
Read more >Thonny, Python IDE for beginners
Thonny's editor makes these easy to spot. Visualization of syntax errors. Explains scopes. Highlighting variable occurrences reminds you that the same name ...
Read more >THONNY 3.3.0 failing to install package MULTIPROCESSING
I am actually using a PYTHON IDE called THONNY 3.3.- and I am not geting any success to install the package MULTI{ROCESSING. Error...
Read more >can't get attribute 'f' on <module '__main__' (built-in)> - You.com
I got multiprocessing to work from within a Jupyter notebook on Windows by saving my function in a separate .py file and including...
Read more >thonny Changelog - PyUp.io
Fix error when running script with closed Shell, 2412 ... For fallback publish 32-bit bundle with Python 3.8 for 32-bit Windows 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’ll add a warning and suggestion for running via Terminal when Thonny’s backend detects importing multiprocessing.
Applying this just in my 3.3.13 thonny worked as well, to get multiprocessing working. Line 133 under
Thonny\Lib\site-packages\thonny\plugins\cpython\cpython_backend.py