
通过run,运行正常。

通过debug,运行失败,异常信息如下:
2022.3.3\plugins\python\helpers\pydev\pydevd.py", line 2177, in main globals = debugger.run(setup['file'], None, None, is_module) File "D:\Program Files\JetBrains\PyCharm 2022.3.3\plugins\python\helpers\pydev\pydevd.py", line 1451, in run self.prepare_to_run() File "D:\Program Files\JetBrains\PyCharm 2022.3.3\plugins\python\helpers\pydev\pydevd.py", line 1339, in prepare_to_run self.patch_threads() File "D:\Program Files\JetBrains\PyCharm 2022.3.3\plugins\python\helpers\pydev\pydevd.py", line 1355, in patch_threads patch_thread_modules() File "D:\Program Files\JetBrains\PyCharm 2022.3.3\plugins\python\helpers\pydev\_pydev_bundle\pydev_monkey.py", line 876, in patch_thread_modules patch_thread_module(t) File "D:\Program Files\JetBrains\PyCharm 2022.3.3\plugins\python\helpers\pydev\_pydev_bundle\pydev_monkey.py", line 839, 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'
这是什么鬼
运行环境:PyCharm 2022.3.3 (Professional Edition) + python 3.10.8+windows11。
通过网上资料说pycharm与python版本不兼容的问题,后面尝试了pycharm-professional-2023.3.7+python-3.11.8-amd64、pycharm-professional-2022.3.3+python-3.11.8-amd64都不行,
把项目中的包名thread改成threads,再次debug运行正常

222

被折叠的 条评论
为什么被折叠?



