• python3 Debug报错 Traceback (most recent call last)


    记录一下,刚入门学习python3,模块可以run,但是debug报错

    下面贴出报错信息

    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    D:Anacondapython.exe "D:jetbrainsPyCharm 2019.1.2helperspydevpydevd.py" --multiproc --qt-support=pyside --client 127.0.0.1 --port 6835 --file D:/PythonDemo/code/cal.py
    Traceback (most recent call last):
    File "D:jetbrainsPyCharm 2019.1.2helperspydev\_pydevd_bundlepydevd_cython_wrapper.py", line 2, in <module>
    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 "D:jetbrainsPyCharm 2019.1.2helperspydev\_pydevd_bundlepydevd_console_integration.py", line 2, in <module>
    from code import InteractiveConsole
    ImportError: cannot import name 'InteractiveConsole' from 'code' (D:PythonDemocode__init__.py)

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File "D:jetbrainsPyCharm 2019.1.2helperspydevpydevd.py", line 28, in <module>
    from _pydevd_bundle.pydevd_additional_thread_info import PyDBAdditionalThreadInfo
    File "D:jetbrainsPyCharm 2019.1.2helperspydev\_pydevd_bundlepydevd_additional_thread_info.py", line 17, in <module>
    from _pydevd_bundle.pydevd_cython_wrapper import PyDBAdditionalThreadInfo
    File "D:jetbrainsPyCharm 2019.1.2helperspydev\_pydevd_bundlepydevd_cython_wrapper.py", line 32, in <module>
    mod = __import__(check_name)
    File "_pydevd_bundlepydevd_cython_win32_37_64.pyx", line 139, in init _pydevd_bundle.pydevd_cython_win32_37_64
    File "D:jetbrainsPyCharm 2019.1.2helperspydev\_pydevd_bundlepydevd_breakpoints.py", line 16, in <module>
    from _pydevd_bundle.pydevd_comm import get_global_debugger
    File "D:jetbrainsPyCharm 2019.1.2helperspydev\_pydevd_bundlepydevd_comm.py", line 80, in <module>
    from _pydevd_bundle import pydevd_console_integration
    File "D:jetbrainsPyCharm 2019.1.2helperspydev\_pydevd_bundlepydevd_console_integration.py", line 4, in <module>
    from _pydevd_bundle.pydevconsole_code_for_ironpython import InteractiveConsole
    File "D:jetbrainsPyCharm 2019.1.2helperspydev\_pydevd_bundlepydevconsole_code_for_ironpython.py", line 305
    exec code in self.locals
    ^
    SyntaxError: Missing parentheses in call to 'exec'

    Process finished with exit code 1

    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    报错的大意是找不到指定模块。

    随即到v2ex找网友询问

    @leishi1313

    @CHYK

    @necomancer

    @goofool

    这几位老哥提醒我

    可能是因为存放demo模块的文件夹起名叫做code导致不能正常识别,因为本人是新手,不清楚这个code是哪里需要的关键字

    但这个操作导致我莫名其妙的不能导入同文件夹内的其他函数和类。

    希望可以帮到别人。

    v2链接

    https://www.v2ex.com/t/589367

  • 相关阅读:
    unity-疑难杂症(一)
    unity-【UI】点击交互(一)
    asp.net core 附加进程调试、指令等
    几种定时器(timer)的区别
    ObjectDisplay 对象属性展示 Display
    IEnumerable,ICollection,IList,List 比较
    Excel等格式文件从服务端调用导出
    Azure DevOps 与VS 2019
    从 数据库表 生成 项目实体 文件
    Border样式
  • 原文地址:https://www.cnblogs.com/igong/p/11309675.html
Copyright © 2020-2023  润新知