python无法运行debug_【Python】代码可以运行,但不能debug

Traceback (most recent call last):

File “C:【软件】PyCharm 2018.2.2helperspydev_pydevd_bundlepydevd_cython_wrapper.py”, line 2, in

from _pydevd_bundle_ext.pydevd_cython import trace_dispatch, PyDBAdditionalThreadInfo, global_cache_skips, global_cache_frame_skips

ModuleNotFoundError: No module named ‘_pydevd_bundle_ext’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File “C:【软件】PyCharm 2018.2.2helperspydevpydevconsole.py”, line 8, in

from code import InteractiveConsole

ImportError: cannot import name ‘InteractiveConsole’ from ‘code’ (E:codecode.py)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File “C:【软件】PyCharm 2018.2.2helperspydevpydevd.py”, line 28, in

from _pydevd_bundle.pydevd_additional_thread_info import PyDBAdditionalThreadInfo

File “C:【软件】PyCharm 2018.2.2helperspydev_pydevd_bundlepydevd_additional_thread_info.py”, line 17, in

from _pydevd_bundle.pydevd_cython_wrapper import PyDBAdditionalThreadInfo

File “C:【软件】PyCharm 2018.2.2helperspydev_pydevd_bundlepydevd_cython_wrapper.py”, line 32, in

mod = import(check_name)

File “_pydevd_bundlepydevd_cython_win32_37_64.pyx”, line 139, in init _pydevd_bundle.pydevd_cython_win32_37_64

File “C:【软件】PyCharm 2018.2.2helperspydev_pydevd_bundlepydevd_breakpoints.py”, line 16, in

from _pydevd_bundle.pydevd_comm import get_global_debugger

File “C:【软件】PyCharm 2018.2.2helperspydev_pydevd_bundlepydevd_comm.py”, line 82, in

import pydevconsole

File “C:【软件】PyCharm 2018.2.2helperspydevpydevconsole.py”, line 10, in

from _pydevd_bundle.pydevconsole_code_for_ironpython import InteractiveConsole

File “C:【软件】PyCharm 2018.2.2helperspydev_pydevd_bundlepydevconsole_code_for_ironpython.py”, line 105

except SyntaxError, err:

^

SyntaxError: invalid syntax

会发生以上 错。

原因是因为我当前目录下有一个叫做code.py的文件,所以python就找不到他原本的code模块了,解决办法也很简单,改一下文件名就好了,以后文件夹名字、文件名尽量避免这类命名。

文章知识点与官方知识档案匹配,可进一步学习相关知识Python入门技能树首页概览212711 人正在系统学习中 相关资源:经典刻录软件尼禄Nero6.6.1.4中文安装版及序列 -其它工具类资源…

声明:本站部分文章及图片源自用户投稿,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!

上一篇 2021年1月11日
下一篇 2021年1月11日

相关推荐