AttributeError: module 'thread' has no attribute 'start_new_thread'
Answered
I'm new to pycharm and I found it's a very good IDE for Python programming.
But I've one problem everytime I want to debug a script I get the follwoing error message:
Traceback (most recent call last):
File "C:\Apps\PyCharm\plugins\python-ce\helpers\pydev\pydevd.py", line 2270, in <module>
main()
File "C:\Apps\PyCharm\plugins\python-ce\helpers\pydev\pydevd.py", line 2252, in main
globals = debugger.run(setup['file'], None, None, is_module)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Apps\PyCharm\plugins\python-ce\helpers\pydev\pydevd.py", line 1521, in run
self.prepare_to_run()
File "C:\Apps\PyCharm\plugins\python-ce\helpers\pydev\pydevd.py", line 1405, in prepare_to_run
self.patch_threads()
File "C:\Apps\PyCharm\plugins\python-ce\helpers\pydev\pydevd.py", line 1425, in patch_threads
patch_thread_modules()
File "C:\Apps\PyCharm\plugins\python-ce\helpers\pydev\_pydev_bundle\pydev_monkey.py", line 943, in patch_thread_modules
patch_thread_module(t)
File "C:\Apps\PyCharm\plugins\python-ce\helpers\pydev\_pydev_bundle\pydev_monkey.py", line 906, in patch_thread_module
_original_start_new_thread = thread_module._original_start_new_thread = thread_module.start_new_thread
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'thread' has no attribute 'start_new_thread'
Process finished with exit code 1Can anybody help me to solve this problem?
Please sign in to leave a comment.
By any chance, do you have a module or script named
thread? The mentioned error can occur due to a conflict with the debugger's attributes in case you create one with the same name.