繁体   English   中英

PyCharm调试器遇到断点时发生错误

[英]PyCharm debugger errors whenever it hits a breakpoint

在调试程序时,只要调试器遇到断点(我已经使用print语句确认了此断点),它将向控制台发送以下错误:

Traceback (most recent call last):
  File "/Applications/PyCharm CE.app/Contents/helpers/pydev/pydevd_frame.py", line 408, in trace_dispatch
    self.doWaitSuspend(thread, frame, event, arg)
  File "/Applications/PyCharm CE.app/Contents/helpers/pydev/pydevd_frame.py", line 53, in doWaitSuspend
    self._args[0].doWaitSuspend(*args, **kwargs)
  File "/Applications/PyCharm CE.app/Contents/helpers/pydev/pydevd.py", line 1445, in doWaitSuspend
    activate_function()
  File "/Applications/PyCharm CE.app/Contents/helpers/pydev/pydev_ipython/matplotlibtools.py", line 136, in activate_pylab
pylab.show._needmain = False
AttributeError: 'module' object has no attribute 'show'
Traceback (most recent call last):
  File "/Applications/PyCharm CE.app/Contents/helpers/pydev/pydevd.py", line 2357, in <module>
    globals = debugger.run(setup['file'], None, None, is_module)
  File "/Applications/PyCharm CE.app/Contents/helpers/pydev/pydevd.py", line 1777, in run
    pydev_imports.execfile(file, globals, locals)  # execute the script
  File "/Users/pkillam/PycharmProjects/untitled/main.py", line 332, in <module>
    profile.run(main())
  File "/Users/pkillam/PycharmProjects/untitled/main.py", line 225, in main
    xyw_intensity_array, xywi_point_array, x_catalog, y_catalog, w_catalog = readFile(input_filename[6])
  File "/Users/pkillam/PycharmProjects/untitled/main.py", line 83, in readFile
    if (areaScan):
  File "/Users/pkillam/PycharmProjects/untitled/main.py", line 83, in readFile
    if (areaScan):
  File "/Applications/PyCharm CE.app/Contents/helpers/pydev/pydevd_frame.py", line 408, in trace_dispatch
    self.doWaitSuspend(thread, frame, event, arg)
  File "/Applications/PyCharm CE.app/Contents/helpers/pydev/pydevd_frame.py", line 53, in doWaitSuspend
    self._args[0].doWaitSuspend(*args, **kwargs)
  File "/Applications/PyCharm CE.app/Contents/helpers/pydev/pydevd.py", line 1445, in doWaitSuspend
    activate_function()
  File "/Applications/PyCharm CE.app/Contents/helpers/pydev/pydev_ipython/matplotlibtools.py", line 136, in activate_pylab
pylab.show._needmain = False
AttributeError: 'module' object has no attribute 'show'

无论我在代码中放置断点的那一行,都会发生这种情况。 它总是在那一行错误。 关于其原因和/或解决方案有什么想法?

显而易见,但我希望确保您的断点在语法上正确。 如果您知道错误仅在您放置断点的地方发生,那么它一定是您编写它的方式。

正如我上面提到的,我遇到了同样的问题,在咨询了Jet Brains社区论坛之后,我可以找到一个解决方案。 我们的matplotlibtools库安装已损坏。

再次安装或升级它,错误应该消失了。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM