PyThon Debug采坑--提示 module ‘thread‘ has no attribute ‘start_new_thread‘

PyThon Debug
C:\Users\Administrator\.IntelliJIdea2018.1\config\plugins\python-ce\helpers\pydev\_pydevd_bundle\pydevd_resolver.py:127: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if found.get(name) is not 1:
pydev debugger: starting

Connected to pydev debugger (build 181.5540.7)
Traceback (most recent call last):
  File "C:\Users\Administrator\.IntelliJIdea2018.1\config\plugins\python-ce\helpers\pydev\pydevd.py", line 1664, in <module>
    main()
  File "C:\Users\Administrator\.IntelliJIdea2018.1\config\plugins\python-ce\helpers\pydev\pydevd.py", line 1658, in main
    globals = debugger.run(setup['file'], None, None, is_module)
  File "C:\Users\Administrator\.IntelliJIdea2018.1\config\plugins\python-ce\helpers\pydev\pydevd.py", line 1044, in run
    self.prepare_to_run()
  File "C:\Users\Administrator\.IntelliJIdea2018.1\config\plugins\python-ce\helpers\pydev\pydevd.py", line 962, in prepare_to_run
    self.patch_threads()
  File "C:\Users\Administrator\.IntelliJIdea2018.1\config\plugins\python-ce\helpers\pydev\pydevd.py", line 983, in patch_threads
    patch_thread_modules()
  File "C:\Users\Administrator\.IntelliJIdea2018.1\config\plugins\python-ce\helpers\pydev\_pydev_bundle\pydev_monkey.py", line 656, in patch_thread_modules
    patch_thread_module(t)
  File "C:\Users\Administrator\.IntelliJIdea2018.1\config\plugins\python-ce\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'
  • 有如上错误提示,表示的意思是thread方法中没有start_new_thread的属性
    • 网上搜索得到的答案都是:包含了thread.py的文件与系统文件重名,重命名一下即可
  • 经过排查后,发现文件中的确没有对应的thread.py,但是有一个包名thread,修改后即可
    在这里插入图片描述
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值