2 bo602505401 bo602505401 于 2017.08.13 16:08 提问

关于pycharm 调试python时抛出非自身程序异常 2C

直接运行2个print语句,顺利打印,但是一断点就报错"
D:\Code Path\Python\python.exe" "D:\Code Path\PyCharm Community Edition 2017.2\helpers\pydev\pydevd.py" --multiproc --qt-support=auto --client 127.0.0.1 --port 51337 --file D:/Pyworkpace/test.py
pydev debugger: process 5864 is connecting

Connected to pydev debugger (build 172.3544.44)
Traceback (most recent call last):
File "D:\Code Path\PyCharm Community Edition 2017.2\helpers\pydev\pydevd.py", line 1599, in
globals = debugger.run(setup['file'], None, None, is_module)
File "D:\Code Path\PyCharm Community Edition 2017.2\helpers\pydev\pydevd.py", line 1002, in run
self.prepare_to_run()
File "D:\Code Path\PyCharm Community Edition 2017.2\helpers\pydev\pydevd.py", line 905, in prepare_to_run
self.patch_threads()
File "D:\Code Path\PyCharm Community Edition 2017.2\helpers\pydev\pydevd.py", line 926, in patch_threads
patch_thread_modules()
File "D:\Code Path\PyCharm Community Edition 2017.2\helpers\pydev_pydev_bundle\pydev_monkey.py", line 656, in patch_thread_modules
patch_thread_module(t)
File "D:\Code Path\PyCharm Community Edition 2017.2\helpers\pydev_pydev_bundle\pydev_monkey.py", line 622, in patch_thread_module
_original_start_new_thread = thread._original_start_new_thread = thread.start_new_thread
AttributeError: module 'thread' has no attribute 'start_new_thread'

重新下了几次pycharm也不行,用的是Anaconda的python3.6

1个回答

zt3032
zt3032   2017.08.13 22:45

从报错看的话,是thread没有start_new_thread这个属性,你可以用dir(thread)看看是否有这个属性。

Csdn user default icon
上传中...
上传图片
插入图片