I'm learning a multiprocessing and have one problem:
[0120/214250.476:ERROR:gpu_process_transport_factory.cc(967)] Lost UI shared
context.
DevTools listening on ws://127.0.0.1:26840/devtools/browser/82bab26a-25fa-
4e67-84d9-ae52ebfbdcae
Traceback (most recent call last):
File "PyInstaBrut.py", line 70, in <module>
p.start()
File "C:\Users\Dima\AppData\Local\Programs\Python\Python37-
32\lib\multiprocessing\process.py", line 112, in start
self._popen = self._Popen(self)
File "C:\Users\Dima\AppData\Local\Programs\Python\Python37-
32\lib\multiprocessing\context.py", line 223, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "C:\Users\Dima\AppData\Local\Programs\Python\Python37-
32\lib\multiprocessing\context.py", line 322, in _Popen
return Popen(process_obj)
File "C:\Users\Dima\AppData\Local\Programs\Python\Python37-
32\lib\multiprocessing\popen_spawn_win32.py", line 65, in __init__
reduction.dump(process_obj, to_child)
File "C:\Users\Dima\AppData\Local\Programs\Python\Python37-
32\lib\multiprocessing\reduction.py", line 60, in dump
ForkingPickler(file, protocol).dump(obj)
AttributeError: Can't pickle local object '_createenviron.
<locals>.encodekey'
E:\PyInstaBrut>Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Dima\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\Dima\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 denined
I read this error, but I don't understand nothing.
The function is standard: has several arguments (but I don't want to show code by some reasons), but a part of it looks like a Process(target=func, args=(arg0, arg1, arg2))
. I start process after if __name__=="__main__":
structure and start in the shell, so I don't know how solve this problem.