Pycharm Debugger not working properly with joblib.Parallel when using loky backend
Answered
The Pycharm debugger does not work properly with joblib.Parallel when using the loky backend with n_jobs param >= 1, instead many spurious errors are printed to the console. (The script does complete correctly however).
The issue may relate to the information on this GitHub post - https://github.com/tomMoral/loky/issues/180 (see @tomMoral commented on 4 Nov 2018)
Debugging the following simple example
from joblib import Parallel, delayed
Parallel(n_jobs=2, backend='loky')(delayed(print)('hello') for _ in range(10))
Give gives this output
/Users/gw/PycharmProjects/sktrain/venv/bin/python "/Applications/PyCharm CE.app/Contents/helpers/pydev/pydevd.py" --multiproc --qt-support=auto --client 127.0.0.1 --port 51400 --file /Users/gw/PycharmProjects/sktrain/misc/multi.py
pydev debugger: process 4913 is connecting
Connected to pydev debugger (build 191.7479.30)
Traceback (most recent call last):
File "/Applications/PyCharm CE.app/Contents/helpers/pydev/_pydevd_bundle/pydevd_comm.py", line 383, in _on_run
r = self.sock.recv(1024)
OSError: [Errno 9] Bad file descriptor
Traceback (most recent call last):
File "/Applications/PyCharm CE.app/Contents/helpers/pydev/_pydevd_bundle/pydevd_comm.py", line 383, in _on_run
r = self.sock.recv(1024)
OSError: [Errno 9] Bad file descriptor
Traceback (most recent call last):
File "/Applications/PyCharm CE.app/Contents/helpers/pydev/_pydevd_bundle/pydevd_comm.py", line 383, in _on_run
r = self.sock.recv(1024)
OSError: [Errno 9] Bad file descriptor
pydev debugger: process 4918 is connecting
pydev debugger: process 4917 is connecting
Traceback (most recent call last):
File "/Applications/PyCharm CE.app/Contents/helpers/pydev/_pydev_bundle/pydev_monkey.py", line 179, in patch_args
host, port = _get_host_port()
File "/Applications/PyCharm CE.app/Contents/helpers/pydev/_pydev_bundle/pydev_monkey.py", line 45, in _get_host_port
host, port = pydevd.dispatch()
File "/Applications/PyCharm CE.app/Contents/helpers/pydev/pydevd.py", line 1506, in dispatch
host = setup['client']
TypeError: 'NoneType' object is not subscriptable
Traceback (most recent call last):
File "/Applications/PyCharm CE.app/Contents/helpers/pydev/_pydev_bundle/pydev_monkey.py", line 179, in patch_args
host, port = _get_host_port()
File "/Applications/PyCharm CE.app/Contents/helpers/pydev/_pydev_bundle/pydev_monkey.py", line 45, in _get_host_port
host, port = pydevd.dispatch()
File "/Applications/PyCharm CE.app/Contents/helpers/pydev/pydevd.py", line 1506, in dispatch
host = setup['client']
TypeError: 'NoneType' object is not subscriptable
hello
hello
hello
hello
hello
hello
hello
hello
hello
hello
Here's the output with PYCHARM_DEBUG=True
/Users/gw/PycharmProjects/sktrain/venv/bin/python "/Applications/PyCharm CE.app/Contents/helpers/pydev/pydevd.py" --multiproc --qt-support=auto --client 127.0.0.1 --port 51499 --file /Users/gw/PycharmProjects/sktrain/misc/multi.py
Using Cython speedups
Unable to load jupyter_debug plugin
Executing file /Users/gw/PycharmProjects/sktrain/misc/multi.py
arguments: ['/Users/gw/PycharmProjects/sktrain/misc/multi.py']
PYDEVD_FILTER_LIBRARIES False
Started in multiproc mode
('Connecting to ', '127.0.0.1', ':', '51499')
('Connected.',)
debugger: received >>99 -1 51500
<<
Received command: ??? 99 -1 51500
Received port 51500
pydev debugger: process 5589 is connecting
Connected to pydev debugger (build 191.7479.30)
('Connecting to ', '127.0.0.1', ':', '51500')
('Connected.',)
debugger: received >>501 1 0.1 UNIX
<<
Received command: CMD_VERSION 501 1 0.1 UNIX
sending cmd --> CMD_VERSION 501 1 191.7479.30
debugger: received >>111 3 python-line /Users/gw/PycharmProjects/sktrain/main.py 92 None THREAD None None
122 5 python-BaseException None None 0 1 0
<<
Received command: CMD_SET_BREAK 111 3 python-line /Users/gw/PycharmProjects/sktrain/main.py 92 None THREAD None None
Added breakpoint:/Users/gw/PycharmProjects/sktrain/main.py - line:92 - func_name:b'None'
Received command: CMD_ADD_EXCEPTION_BREAK 122 5 python-BaseException None None 0 1 0
Exceptions to hook on terminate: {'BaseException': <_pydevd_bundle.pydevd_breakpoints.ExceptionBreakpoint object at 0x11156d588>}
debugger: received >>101 7
146 9 SHOW_RETURN_VALUES 0
<<
Received command: CMD_RUN 101 7
Received command: CMD_SHOW_RETURN_VALUES 146 9 SHOW_RETURN_VALUES 0
Show return values: False
Patching args: ['/Users/gw/PycharmProjects/sktrain/venv/bin/python', '-B', '-c', 'from multiprocessing.semaphore_tracker import main;main(6)']
('Connecting to ', '127.0.0.1', ':', '51499')
('Connected.',)
debugger: received >>99 -1 51504
<<
Received command: ??? 99 -1 51504
sending cmd --> CMD_PROCESS_CREATED 149 2 <process/>
sending cmd --> CMD_PROCESS_CREATED 149 4 <process/>
('Connecting to ', '127.0.0.1', ':', '51499')
('Connected.',)
sending cmd --> CMD_PROCESS_CREATED 149 6 <process/>
('Connecting to ', '127.0.0.1', ':', '51499')
('Connected.',)
sending cmd --> CMD_PROCESS_CREATED 149 8 <process/>
('Connecting to ', '127.0.0.1', ':', '51499')
IDE_PROJECT_ROOTS ['/Users/gw/PycharmProjects/sktrain']
('Connected.',)
Using Cython speedups
Unable to load jupyter_debug plugin
PYDEVD_FILTER_LIBRARIES False
('Connecting to ', '127.0.0.1', ':', '51504')
('Connected.',)
debugger: received >>501 1 0.1 UNIX
<<
Received command: CMD_VERSION 501 1 0.1 UNIX
sending cmd --> CMD_VERSION 501 1 191.7479.30
debugger: received >>111 3 python-line /Users/gw/PycharmProjects/sktrain/main.py 92 None THREAD None None
<<
Received command: CMD_SET_BREAK 111 3 python-line /Users/gw/PycharmProjects/sktrain/main.py 92 None THREAD None None
debugger: received >>111 11 python-line /Users/gw/PycharmProjects/sktrain/main.py 92 None THREAD None None
122 13 python-BaseException None None 0 1 0
<<
Received command: CMD_SET_BREAK 111 11 python-line /Users/gw/PycharmProjects/sktrain/main.py 92 None THREAD None None
Added breakpoint:/Users/gw/PycharmProjects/sktrain/main.py - line:92 - func_name:b'None'
debugger: received >>101 5
<<
Received command: CMD_RUN 101 5
debugger: received >>122 7 python-BaseException None None 0 1 0
146 9 SHOW_RETURN_VALUES 0
<<
Received command: CMD_ADD_EXCEPTION_BREAK 122 7 python-BaseException None None 0 1 0
debugger: received >>99 -1 51509
<<
Exceptions to hook on terminate: {'BaseException': <_pydevd_bundle.pydevd_breakpoints.ExceptionBreakpoint object at 0x10aa0af28>}
Received command: CMD_SHOW_RETURN_VALUES 146 9 SHOW_RETURN_VALUES 0
Show return values: False
Added breakpoint:/Users/gw/PycharmProjects/sktrain/main.py - line:92 - func_name:b'None'
Received command: ??? 99 -1 51509
Received command: CMD_ADD_EXCEPTION_BREAK 122 13 python-BaseException None None 0 1 0
Exceptions to hook on terminate: {'BaseException': <_pydevd_bundle.pydevd_breakpoints.ExceptionBreakpoint object at 0x11c14de10>}
debugger: received >>146 15 SHOW_RETURN_VALUES 0
<<
Received command: CMD_SHOW_RETURN_VALUES 146 15 SHOW_RETURN_VALUES 0
Show return values: False
PYDEVD_FILTER_LIBRARIES False
('Connecting to ', '127.0.0.1', ':', '51509')
('Connected.',)
debugger: received >>501 1 0.1 UNIX
<<
Received command: CMD_VERSION 501 1 0.1 UNIX
sending cmd --> CMD_VERSION 501 1 191.7479.30
debugger: received >>111 17 python-line /Users/gw/PycharmProjects/sktrain/main.py 92 None THREAD None None
<<
debugger: received >>111 11 python-line /Users/gw/PycharmProjects/sktrain/main.py 92 None THREAD None None
<<
debugger: received >>111 3 python-line /Users/gw/PycharmProjects/sktrain/main.py 92 None THREAD None None
<<
Received command: CMD_SET_BREAK 111 17 python-line /Users/gw/PycharmProjects/sktrain/main.py 92 None THREAD None None
Received command: CMD_SET_BREAK 111 11 python-line /Users/gw/PycharmProjects/sktrain/main.py 92 None THREAD None None
Received command: CMD_SET_BREAK 111 3 python-line /Users/gw/PycharmProjects/sktrain/main.py 92 None THREAD None None
Added breakpoint:/Users/gw/PycharmProjects/sktrain/main.py - line:92 - func_name:b'None'
Added breakpoint:/Users/gw/PycharmProjects/sktrain/main.py - line:92 - func_name:b'None'
debugger: received >>122 13 python-BaseException None None 0 1 0
<<
Received command: CMD_ADD_EXCEPTION_BREAK 122 13 python-BaseException None None 0 1 0
Exceptions to hook on terminate: {'BaseException': <_pydevd_bundle.pydevd_breakpoints.ExceptionBreakpoint object at 0x10aa0ae80>}
debugger: received >>146 15 SHOW_RETURN_VALUES 0
<<
Received command: CMD_SHOW_RETURN_VALUES 146 15 SHOW_RETURN_VALUES 0
Show return values: False
Added breakpoint:/Users/gw/PycharmProjects/sktrain/main.py - line:92 - func_name:b'None'
debugger: received >>146 19 SHOW_RETURN_VALUES 0
122 21 python-BaseException None None 0 1 0
<<
Received command: CMD_SHOW_RETURN_VALUES 146 19 SHOW_RETURN_VALUES 0
Show return values: False
Received command: CMD_ADD_EXCEPTION_BREAK 122 21 python-BaseException None None 0 1 0
debugger: received >>99 -1 51511
<<
debugger: received >>122 5 python-BaseException None None 0 1 0
101 7
146 9 SHOW_RETURN_VALUES 0
<<
Exceptions to hook on terminate: {'BaseException': <_pydevd_bundle.pydevd_breakpoints.ExceptionBreakpoint object at 0x11c14df98>}
Received command: CMD_ADD_EXCEPTION_BREAK 122 5 python-BaseException None None 0 1 0
Received command: ??? 99 -1 51511
Exceptions to hook on terminate: {'BaseException': <_pydevd_bundle.pydevd_breakpoints.ExceptionBreakpoint object at 0x11c136780>}
Received command: CMD_RUN 101 7
Received command: CMD_SHOW_RETURN_VALUES 146 9 SHOW_RETURN_VALUES 0
Show return values: False
PYDEVD_FILTER_LIBRARIES False
('Connecting to ', '127.0.0.1', ':', '51511')
('Connected.',)
debugger: received >>501 1 0.1 UNIX
<<
Received command: CMD_VERSION 501 1 0.1 UNIX
sending cmd --> CMD_VERSION 501 1 191.7479.30
debugger: received >>111 23 python-line /Users/gw/PycharmProjects/sktrain/main.py 92 None THREAD None None
<<
debugger: received >>111 11 python-line /Users/gw/PycharmProjects/sktrain/main.py 92 None THREAD None None
<<
Received command: CMD_SET_BREAK 111 23 python-line /Users/gw/PycharmProjects/sktrain/main.py 92 None THREAD None None
debugger: received >>111 17 python-line /Users/gw/PycharmProjects/sktrain/main.py 92 None THREAD None None
<<
Received command: CMD_SET_BREAK 111 11 python-line /Users/gw/PycharmProjects/sktrain/main.py 92 None THREAD None None
Received command: CMD_SET_BREAK 111 17 python-line /Users/gw/PycharmProjects/sktrain/main.py 92 None THREAD None None
Added breakpoint:/Users/gw/PycharmProjects/sktrain/main.py - line:92 - func_name:b'None'
Added breakpoint:/Users/gw/PycharmProjects/sktrain/main.py - line:92 - func_name:b'None'
debugger: received >>111 3 python-line /Users/gw/PycharmProjects/sktrain/main.py 92 None THREAD None None
<<
Received command: CMD_SET_BREAK 111 3 python-line /Users/gw/PycharmProjects/sktrain/main.py 92 None THREAD None None
Added breakpoint:/Users/gw/PycharmProjects/sktrain/main.py - line:92 - func_name:b'None'
debugger: received >>122 25 python-BaseException None None 0 1 0
146 27 SHOW_RETURN_VALUES 0
<<
Received command: CMD_ADD_EXCEPTION_BREAK 122 25 python-BaseException None None 0 1 0
Exceptions to hook on terminate: {'BaseException': <_pydevd_bundle.pydevd_breakpoints.ExceptionBreakpoint object at 0x11156dac8>}
Added breakpoint:/Users/gw/PycharmProjects/sktrain/main.py - line:92 - func_name:b'None'
Received command: CMD_SHOW_RETURN_VALUES 146 27 SHOW_RETURN_VALUES 0
Show return values: False
debugger: received >>122 19 python-BaseException None None 0 1 0
146 21 SHOW_RETURN_VALUES 0
<<
Received command: CMD_ADD_EXCEPTION_BREAK 122 19 python-BaseException None None 0 1 0
Exceptions to hook on terminate: {'BaseException': <_pydevd_bundle.pydevd_breakpoints.ExceptionBreakpoint object at 0x10aa04128>}
debugger: received >>99 -1 51513
<<
Received command: CMD_SHOW_RETURN_VALUES 146 21 SHOW_RETURN_VALUES 0
Show return values: False
debugger: received >>122 5 python-BaseException None None 0 1 0
101 7
146 9 SHOW_RETURN_VALUES 0
<<
Received command: CMD_ADD_EXCEPTION_BREAK 122 5 python-BaseException None None 0 1 0
Received command: ??? 99 -1 51513
debugger: received >>122 13 python-BaseException None None 0 1 0
146 15 SHOW_RETURN_VALUES 0
<<
Received command: CMD_ADD_EXCEPTION_BREAK 122 13 python-BaseException None None 0 1 0
Exceptions to hook on terminate: {'BaseException': <_pydevd_bundle.pydevd_breakpoints.ExceptionBreakpoint object at 0x11c1367f0>}
Exceptions to hook on terminate: {'BaseException': <_pydevd_bundle.pydevd_breakpoints.ExceptionBreakpoint object at 0x11c14da20>}
Received command: CMD_RUN 101 7
Received command: CMD_SHOW_RETURN_VALUES 146 9 SHOW_RETURN_VALUES 0
Show return values: False
Received command: CMD_SHOW_RETURN_VALUES 146 15 SHOW_RETURN_VALUES 0
Show return values: False
PYDEVD_FILTER_LIBRARIES False
('Connecting to ', '127.0.0.1', ':', '51513')
('Connected.',)
debugger: received >>501 1 0.1 UNIX
<<
Received command: CMD_VERSION 501 1 0.1 UNIX
sending cmd --> CMD_VERSION 501 1 191.7479.30
debugger: received >>111 23 python-line /Users/gw/PycharmProjects/sktrain/main.py 92 None THREAD None None
<<
debugger: received >>111 29 python-line /Users/gw/PycharmProjects/sktrain/main.py 92 None THREAD None None
<<
Received command: CMD_SET_BREAK 111 23 python-line /Users/gw/PycharmProjects/sktrain/main.py 92 None THREAD None None
debugger: received >>111 17 python-line /Users/gw/PycharmProjects/sktrain/main.py 92 None THREAD None None
<<
Received command: CMD_SET_BREAK 111 29 python-line /Users/gw/PycharmProjects/sktrain/main.py 92 None THREAD None None
Received command: CMD_SET_BREAK 111 17 python-line /Users/gw/PycharmProjects/sktrain/main.py 92 None THREAD None None
Added breakpoint:/Users/gw/PycharmProjects/sktrain/main.py - line:92 - func_name:b'None'
Added breakpoint:/Users/gw/PycharmProjects/sktrain/main.py - line:92 - func_name:b'None'
debugger: received >>111 11 python-line /Users/gw/PycharmProjects/sktrain/main.py 92 None THREAD None None
<<
Received command: CMD_SET_BREAK 111 11 python-line /Users/gw/PycharmProjects/sktrain/main.py 92 None THREAD None None
Added breakpoint:/Users/gw/PycharmProjects/sktrain/main.py - line:92 - func_name:b'None'
debugger: received >>122 31 python-BaseException None None 0 1 0
<<
Received command: CMD_ADD_EXCEPTION_BREAK 122 31 python-BaseException None None 0 1 0
Added breakpoint:/Users/gw/PycharmProjects/sktrain/main.py - line:92 - func_name:b'None'
Exceptions to hook on terminate: {'BaseException': <_pydevd_bundle.pydevd_breakpoints.ExceptionBreakpoint object at 0x11c14dda0>}
debugger: received >>111 3 python-line /Users/gw/PycharmProjects/sktrain/main.py 92 None THREAD None None
122 5 python-BaseException None None 0 1 0
<<
Received command: CMD_SET_BREAK 111 3 python-line /Users/gw/PycharmProjects/sktrain/main.py 92 None THREAD None None
debugger: received >>122 19 python-BaseException None None 0 1 0
<<
Received command: CMD_ADD_EXCEPTION_BREAK 122 19 python-BaseException None None 0 1 0
Exceptions to hook on terminate: {'BaseException': <_pydevd_bundle.pydevd_breakpoints.ExceptionBreakpoint object at 0x11c136860>}
Added breakpoint:/Users/gw/PycharmProjects/sktrain/main.py - line:92 - func_name:b'None'
debugger: received >>122 13 python-BaseException None None 0 1 0
<<
Received command: CMD_ADD_EXCEPTION_BREAK 122 13 python-BaseException None None 0 1 0
Received command: CMD_ADD_EXCEPTION_BREAK 122 5 python-BaseException None None 0 1 0
Exceptions to hook on terminate: {'BaseException': <_pydevd_bundle.pydevd_breakpoints.ExceptionBreakpoint object at 0x11c14d9b0>}
debugger: received >>122 25 python-BaseException None None 0 1 0
146 27 SHOW_RETURN_VALUES 0
<<
Received command: CMD_ADD_EXCEPTION_BREAK 122 25 python-BaseException None None 0 1 0
debugger: received >>146 21 SHOW_RETURN_VALUES 0
<<
Exceptions to hook on terminate: {'BaseException': <_pydevd_bundle.pydevd_breakpoints.ExceptionBreakpoint object at 0x10aa04400>}
Received command: CMD_SHOW_RETURN_VALUES 146 21 SHOW_RETURN_VALUES 0
Received command: CMD_SHOW_RETURN_VALUES 146 27 SHOW_RETURN_VALUES 0
Show return values: False
debugger: received >>146 33 SHOW_RETURN_VALUES 0
<<
Show return values: False
Received command: CMD_SHOW_RETURN_VALUES 146 33 SHOW_RETURN_VALUES 0
Show return values: False
Exceptions to hook on terminate: {'BaseException': <_pydevd_bundle.pydevd_breakpoints.ExceptionBreakpoint object at 0x11c14db70>}
debugger: received >>146 15 SHOW_RETURN_VALUES 0
<<
debugger: received >>101 7
146 9 SHOW_RETURN_VALUES 0
<<
Received command: CMD_SHOW_RETURN_VALUES 146 15 SHOW_RETURN_VALUES 0
Received command: CMD_RUN 101 7
Show return values: False
Received command: CMD_SHOW_RETURN_VALUES 146 9 SHOW_RETURN_VALUES 0
Show return values: False
IDE_PROJECT_ROOTS ['/Users/gw/PycharmProjects/sktrain']
IDE_PROJECT_ROOTS ['/Users/gw/PycharmProjects/sktrain']
IDE_PROJECT_ROOTS ['/Users/gw/PycharmProjects/sktrain']
IDE_PROJECT_ROOTS ['/Users/gw/PycharmProjects/sktrain']
Traceback (most recent call last):
File "/Applications/PyCharm CE.app/Contents/helpers/pydev/_pydevd_bundle/pydevd_comm.py", line 383, in _on_run
r = self.sock.recv(1024)
OSError: [Errno 9] Bad file descriptor
Patching args: ['/Users/gw/PycharmProjects/sktrain/venv/bin/python', '-m', 'joblib.externals.loky.backend.popen_loky_posix', '--process-name', 'LokyProcess-2', '--pipe', '24', '--semaphore', '8']
Traceback (most recent call last):
File "/Applications/PyCharm CE.app/Contents/helpers/pydev/_pydevd_bundle/pydevd_comm.py", line 383, in _on_run
r = self.sock.recv(1024)
OSError: [Errno 9] Bad file descriptor
Traceback (most recent call last):
File "/Applications/PyCharm CE.app/Contents/helpers/pydev/_pydevd_bundle/pydevd_comm.py", line 383, in _on_run
r = self.sock.recv(1024)
OSError: [Errno 9] Bad file descriptor
Patching args: ['/Users/gw/PycharmProjects/sktrain/venv/bin/python', '-m', 'joblib.externals.loky.backend.popen_loky_posix', '--process-name', 'LokyProcess-1', '--pipe', '22', '--semaphore', '8']
Patching args: ['/Users/gw/PycharmProjects/sktrain/venv/bin/python', '-B', '-c', 'from joblib.externals.loky.backend.semaphore_tracker import main; main(6)']
('Connecting to ', '127.0.0.1', ':', '51499')
('Connected.',)
debugger: received >>99 -1 51516
<<
Received command: ??? 99 -1 51516
Using Cython speedups
Unable to load jupyter_debug plugin
Executing file joblib.externals.loky.backend.popen_loky_posix
arguments: ['joblib.externals.loky.backend.popen_loky_posix', '--process-name', 'LokyProcess-2', '--pipe', '24', '--semaphore', '8']
PYDEVD_FILTER_LIBRARIES False
Started in multiproc mode
('Connecting to ', '127.0.0.1', ':', '51499')
('Connected.',)
Using Cython speedups
Using Cython speedups
Unable to load jupyter_debug plugin
Executing file joblib.externals.loky.backend.popen_loky_posix
arguments: ['joblib.externals.loky.backend.popen_loky_posix', '--process-name', 'LokyProcess-1', '--pipe', '22', '--semaphore', '8']
PYDEVD_FILTER_LIBRARIES False
Started in multiproc mode
('Connecting to ', '127.0.0.1', ':', '51499')
('Connected.',)
Unable to load jupyter_debug plugin
PYDEVD_FILTER_LIBRARIES False
('Connecting to ', '127.0.0.1', ':', '51516')
('Connected.',)
debugger: received >>501 1 0.1 UNIX
<<
Received command: CMD_VERSION 501 1 0.1 UNIX
sending cmd --> CMD_VERSION 501 1 191.7479.30
debugger: received >>111 35 python-line /Users/gw/PycharmProjects/sktrain/main.py 92 None THREAD None None
122 37 python-BaseException None None 0 1 0
<<
debugger: received >>111 3 python-line /Users/gw/PycharmProjects/sktrain/main.py 92 None THREAD None None
<<
debugger: received >>111 29 python-line /Users/gw/PycharmProjects/sktrain/main.py 92 None THREAD None None
122 31 python-BaseException None None 0 1 0
<<
Received command: CMD_SET_BREAK 111 3 python-line /Users/gw/PycharmProjects/sktrain/main.py 92 None THREAD None None
Received command: CMD_SET_BREAK 111 29 python-line /Users/gw/PycharmProjects/sktrain/main.py 92 None THREAD None None
Received command: CMD_SET_BREAK 111 35 python-line /Users/gw/PycharmProjects/sktrain/main.py 92 None THREAD None None
Added breakpoint:/Users/gw/PycharmProjects/sktrain/main.py - line:92 - func_name:b'None'
Added breakpoint:/Users/gw/PycharmProjects/sktrain/main.py - line:92 - func_name:b'None'
Added breakpoint:/Users/gw/PycharmProjects/sktrain/main.py - line:92 - func_name:b'None'
Received command: CMD_ADD_EXCEPTION_BREAK 122 31 python-BaseException None None 0 1 0
debugger: received >>101 5
<<
Received command: CMD_RUN 101 5
Exceptions to hook on terminate: {'BaseException': <_pydevd_bundle.pydevd_breakpoints.ExceptionBreakpoint object at 0x10a954780>}
Received command: CMD_ADD_EXCEPTION_BREAK 122 37 python-BaseException None None 0 1 0
Exceptions to hook on terminate: {'BaseException': <_pydevd_bundle.pydevd_breakpoints.ExceptionBreakpoint object at 0x11c14ddd8>}
debugger: received >>146 33 SHOW_RETURN_VALUES 0
<<
debugger: received >>122 7 python-BaseException None None 0 1 0
<<
Received command: CMD_SHOW_RETURN_VALUES 146 33 SHOW_RETURN_VALUES 0
Received command: CMD_ADD_EXCEPTION_BREAK 122 7 python-BaseException None None 0 1 0
Show return values: False
debugger: received >>99 -1 51520
<<
Received command: ??? 99 -1 51520
Received port 51520
Exceptions to hook on terminate: {'BaseException': <_pydevd_bundle.pydevd_breakpoints.ExceptionBreakpoint object at 0x10d94cd68>}
pydev debugger: process 5594 is connecting
debugger: received >>146 9 SHOW_RETURN_VALUES 0
<<
Received command: CMD_SHOW_RETURN_VALUES 146 9 SHOW_RETURN_VALUES 0
Show return values: False
debugger: received >>146 39 SHOW_RETURN_VALUES 0
<<
Received command: CMD_SHOW_RETURN_VALUES 146 39 SHOW_RETURN_VALUES 0
Show return values: False
('Connecting to ', '127.0.0.1', ':', '51520')
('Connected.',)
debugger: received >>501 1 0.1 UNIX
<<
Received command: CMD_VERSION 501 1 0.1 UNIX
sending cmd --> CMD_VERSION 501 1 191.7479.30
debugger: received >>111 41 python-line /Users/gw/PycharmProjects/sktrain/main.py 92 None THREAD None None
<<
Received command: CMD_SET_BREAK 111 41 python-line /Users/gw/PycharmProjects/sktrain/main.py 92 None THREAD None None
debugger: received >>111 35 python-line /Users/gw/PycharmProjects/sktrain/main.py 92 None THREAD None None
122 37 python-BaseException None None 0 1 0
<<
Received command: CMD_SET_BREAK 111 35 python-line /Users/gw/PycharmProjects/sktrain/main.py 92 None THREAD None None
Added breakpoint:/Users/gw/PycharmProjects/sktrain/main.py - line:92 - func_name:b'None'
Added breakpoint:/Users/gw/PycharmProjects/sktrain/main.py - line:92 - func_name:b'None'
Received command: CMD_ADD_EXCEPTION_BREAK 122 37 python-BaseException None None 0 1 0
debugger: received >>111 11 python-line /Users/gw/PycharmProjects/sktrain/main.py 92 None THREAD None None
<<
Exceptions to hook on terminate: {'BaseException': <_pydevd_bundle.pydevd_breakpoints.ExceptionBreakpoint object at 0x10a8c7048>}
Received command: CMD_SET_BREAK 111 11 python-line /Users/gw/PycharmProjects/sktrain/main.py 92 None THREAD None None
debugger: received >>111 3 python-line /Users/gw/PycharmProjects/sktrain/main.py 92 None THREAD None None
<<
Added breakpoint:/Users/gw/PycharmProjects/sktrain/main.py - line:92 - func_name:b'None'
Received command: CMD_SET_BREAK 111 3 python-line /Users/gw/PycharmProjects/sktrain/main.py 92 None THREAD None None
debugger: received >>122 43 python-BaseException None None 0 1 0
<<
Received command: CMD_ADD_EXCEPTION_BREAK 122 43 python-BaseException None None 0 1 0
Exceptions to hook on terminate: {'BaseException': <_pydevd_bundle.pydevd_breakpoints.ExceptionBreakpoint object at 0x11156db00>}
Added breakpoint:/Users/gw/PycharmProjects/sktrain/main.py - line:92 - func_name:b'None'
debugger: received >>122 13 python-BaseException None None 0 1 0
146 15 SHOW_RETURN_VALUES 0
<<
Received command: CMD_ADD_EXCEPTION_BREAK 122 13 python-BaseException None None 0 1 0
Exceptions to hook on terminate: {'BaseException': <_pydevd_bundle.pydevd_breakpoints.ExceptionBreakpoint object at 0x10d94cda0>}
Received command: CMD_SHOW_RETURN_VALUES 146 15 SHOW_RETURN_VALUES 0
Show return values: False
debugger: received >>122 5 python-BaseException None None 0 1 0
101 7
<<
Received command: CMD_ADD_EXCEPTION_BREAK 122 5 python-BaseException None None 0 1 0
Exceptions to hook on terminate: {'BaseException': <_pydevd_bundle.pydevd_breakpoints.ExceptionBreakpoint object at 0x10830ffd0>}
debugger: received >>146 45 SHOW_RETURN_VALUES 0
<<
Received command: CMD_RUN 101 7
Received command: CMD_SHOW_RETURN_VALUES 146 45 SHOW_RETURN_VALUES 0
debugger: received >>146 39 SHOW_RETURN_VALUES 0
<<
Show return values: False
Received command: CMD_SHOW_RETURN_VALUES 146 39 SHOW_RETURN_VALUES 0
debugger: received >>146 9 SHOW_RETURN_VALUES 0
<<
Received command: CMD_SHOW_RETURN_VALUES 146 9 SHOW_RETURN_VALUES 0
Show return values: False
Show return values: False
debugger: received >>99 -1 51522
<<
Received command: ??? 99 -1 51522
Received port 51522
pydev debugger: process 5593 is connecting
('Connecting to ', '127.0.0.1', ':', '51522')
('Connected.',)
debugger: received >>501 1 0.1 UNIX
<<
Received command: CMD_VERSION 501 1 0.1 UNIX
sending cmd --> CMD_VERSION 501 1 191.7479.30
debugger: received >>111 47 python-line /Users/gw/PycharmProjects/sktrain/main.py 92 None THREAD None None
122 49 python-BaseException None None 0 1 0
<<
Received command: CMD_SET_BREAK 111 47 python-line /Users/gw/PycharmProjects/sktrain/main.py 92 None THREAD None None
Added breakpoint:/Users/gw/PycharmProjects/sktrain/main.py - line:92 - func_name:b'None'
debugger: received >>111 41 python-line /Users/gw/PycharmProjects/sktrain/main.py 92 None THREAD None None
122 43 python-BaseException None None 0 1 0
146 45 SHOW_RETURN_VALUES 0
<<
Received command: CMD_SET_BREAK 111 41 python-line /Users/gw/PycharmProjects/sktrain/main.py 92 None THREAD None None
debugger: received >>111 17 python-line /Users/gw/PycharmProjects/sktrain/main.py 92 None THREAD None None
122 19 python-BaseException None None 0 1 0
146 21 SHOW_RETURN_VALUES 0
<<
Received command: CMD_ADD_EXCEPTION_BREAK 122 49 python-BaseException None None 0 1 0
Received command: CMD_SET_BREAK 111 17 python-line /Users/gw/PycharmProjects/sktrain/main.py 92 None THREAD None None
debugger: received >>111 3 python-line /Users/gw/PycharmProjects/sktrain/main.py 92 None THREAD None None
122 5 python-BaseException None None 0 1 0
101 7
146 9 SHOW_RETURN_VALUES 0
<<
Received command: CMD_SET_BREAK 111 3 python-line /Users/gw/PycharmProjects/sktrain/main.py 92 None THREAD None None
Added breakpoint:/Users/gw/PycharmProjects/sktrain/main.py - line:92 - func_name:b'None'
Exceptions to hook on terminate: {'BaseException': <_pydevd_bundle.pydevd_breakpoints.ExceptionBreakpoint object at 0x11c14dfd0>}
Received command: CMD_ADD_EXCEPTION_BREAK 122 19 python-BaseException None None 0 1 0
Exceptions to hook on terminate: {'BaseException': <_pydevd_bundle.pydevd_breakpoints.ExceptionBreakpoint object at 0x10cc69860>}
Added breakpoint:/Users/gw/PycharmProjects/sktrain/main.py - line:92 - func_name:b'None'
Received command: CMD_SHOW_RETURN_VALUES 146 21 SHOW_RETURN_VALUES 0
Received command: CMD_ADD_EXCEPTION_BREAK 122 5 python-BaseException None None 0 1 0
Show return values: False
debugger: received >>146 51 SHOW_RETURN_VALUES 0
<<
debugger: received >>111 11 python-line /Users/gw/PycharmProjects/sktrain/main.py 92 None THREAD None None
122 13 python-BaseException None None 0 1 0
146 15 SHOW_RETURN_VALUES 0
<<
Exceptions to hook on terminate: {'BaseException': <_pydevd_bundle.pydevd_breakpoints.ExceptionBreakpoint object at 0x10aabcbe0>}
Received command: CMD_SHOW_RETURN_VALUES 146 51 SHOW_RETURN_VALUES 0
Received command: CMD_SET_BREAK 111 11 python-line /Users/gw/PycharmProjects/sktrain/main.py 92 None THREAD None None
Received command: CMD_RUN 101 7
Show return values: False
Received command: CMD_SHOW_RETURN_VALUES 146 9 SHOW_RETURN_VALUES 0
Added breakpoint:/Users/gw/PycharmProjects/sktrain/main.py - line:92 - func_name:b'None'
Show return values: False
Added breakpoint:/Users/gw/PycharmProjects/sktrain/main.py - line:92 - func_name:b'None'
Received command: CMD_ADD_EXCEPTION_BREAK 122 43 python-BaseException None None 0 1 0
Received command: CMD_ADD_EXCEPTION_BREAK 122 13 python-BaseException None None 0 1 0
Exceptions to hook on terminate: {'BaseException': <_pydevd_bundle.pydevd_breakpoints.ExceptionBreakpoint object at 0x10a8c8860>}
Exceptions to hook on terminate: {'BaseException': <_pydevd_bundle.pydevd_breakpoints.ExceptionBreakpoint object at 0x10830f518>}
Received command: CMD_SHOW_RETURN_VALUES 146 15 SHOW_RETURN_VALUES 0
Received command: CMD_SHOW_RETURN_VALUES 146 45 SHOW_RETURN_VALUES 0
Show return values: False
Show return values: False
IDE_PROJECT_ROOTS ['/Users/gw/PycharmProjects/sktrain']
Patching args: ['/Users/gw/PycharmProjects/sktrain/venv/bin/python', '-B', '-c', 'from multiprocessing.semaphore_tracker import main;main(5)']
Traceback (most recent call last):
File "/Applications/PyCharm CE.app/Contents/helpers/pydev/_pydev_bundle/pydev_monkey.py", line 179, in patch_args
host, port = _get_host_port()
File "/Applications/PyCharm CE.app/Contents/helpers/pydev/_pydev_bundle/pydev_monkey.py", line 45, in _get_host_port
host, port = pydevd.dispatch()
File "/Applications/PyCharm CE.app/Contents/helpers/pydev/pydevd.py", line 1506, in dispatch
host = setup['client']
TypeError: 'NoneType' object is not subscriptable
sending cmd --> CMD_PROCESS_CREATED 149 2 <process/>
Patching args: ['/Users/gw/PycharmProjects/sktrain/venv/bin/python', '-B', '-c', 'from multiprocessing.semaphore_tracker import main;main(5)']
Traceback (most recent call last):
File "/Applications/PyCharm CE.app/Contents/helpers/pydev/_pydev_bundle/pydev_monkey.py", line 179, in patch_args
host, port = _get_host_port()
File "/Applications/PyCharm CE.app/Contents/helpers/pydev/_pydev_bundle/pydev_monkey.py", line 45, in _get_host_port
host, port = pydevd.dispatch()
File "/Applications/PyCharm CE.app/Contents/helpers/pydev/pydevd.py", line 1506, in dispatch
host = setup['client']
TypeError: 'NoneType' object is not subscriptable
sending cmd --> CMD_PROCESS_CREATED 149 2 <process/>
hello
hello
hello
hello
Patching args: ['/Users/gw/PycharmProjects/sktrain/venv/bin/python', '-B', '-c', 'from multiprocessing.semaphore_tracker import main;main(4)']
('Connecting to ', '127.0.0.1', ':', '51499')
('Connected.',)
debugger: received >>99 -1 51525
<<
Received command: ??? 99 -1 51525
sending cmd --> CMD_PROCESS_CREATED 149 2 <process/>
hello
hello
hello
hello
hello
hello
Process finished with exit code 0
Please sign in to leave a comment.
Hi,
I'm able to reproduce it, thanks for the code snippet.
Here is a corresponding bug report https://youtrack.jetbrains.com/issue/PY-36882, please vote for it and follow for updates.