multiprocessing errors

Answered

I'm executing these lines in PyCharm 2020.2.3 console:

import multiprocessing
multiprocessing.Pool()

And getting these 2 errors:


Python 3.7.1 (v3.7.1:260ec2c36a, Oct 20 2018, 14:05:16) [MSC v.1915 32 bit (Intel)] on win32
import multiprocessing
multiprocessing.Pool()
<multiprocessing.pool.Pool object at 0x04772090>

Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\1\AppData\Local\Programs\Python\Python37-32\lib\multiprocessing\spawn.py", line 105, in spawn_main
exitcode = _main(fd)
File "C:\Users\1\AppData\Local\Programs\Python\Python37-32\lib\multiprocessing\spawn.py", line 114, in _main
prepare(preparation_data)
File "C:\Users\1\AppData\Local\Programs\Python\Python37-32\lib\multiprocessing\spawn.py", line 225, in prepare
_fixup_main_from_path(data['init_main_from_path'])
File "C:\Users\1\AppData\Local\Programs\Python\Python37-32\lib\multiprocessing\spawn.py", line 277, in _fixup_main_from_path
run_name="__mp_main__")
File "C:\Users\1\AppData\Local\Programs\Python\Python37-32\lib\runpy.py", line 261, in run_path
code, fname = _get_code_from_file(run_name, path_name)
File "C:\Users\1\AppData\Local\Programs\Python\Python37-32\lib\runpy.py", line 231, in _get_code_from_file
with open(fname, "rb") as f:
OSError: [Errno 22] Invalid argument: 'C:\\Users\\1\\PycharmProjects\\untitled2\\<input>'

 

Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\1\AppData\Local\Programs\Python\Python37-32\lib\multiprocessing\spawn.py", line 99, in spawn_main
new_handle = reduction.steal_handle(parent_pid, pipe_handle)
File "C:\Users\1\AppData\Local\Programs\Python\Python37-32\lib\multiprocessing\reduction.py", line 87, in steal_handle
_winapi.DUPLICATE_SAME_ACCESS | _winapi.DUPLICATE_CLOSE_SOURCE)
PermissionError: [WinError 5] Access is denied

 

3 comments
Comment actions Permalink

Have you tried running it in PyCharm's terminal and the system command prompt?

What are the results?

0
Comment actions Permalink

Hi. 

I get this errors only when executing these lines in the console.

 

0
Comment actions Permalink

The issue appears to be known https://youtrack.jetbrains.com/issue/PY-36151, please upvote to help us prioritize it.

1

Please sign in to leave a comment.