Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/356.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python PyCharm调试器在遇到断点时出错_Python_Debugging_Compiler Errors_Pycharm_Breakpoints - Fatal编程技术网

Python PyCharm调试器在遇到断点时出错

Python PyCharm调试器在遇到断点时出错,python,debugging,compiler-errors,pycharm,breakpoints,Python,Debugging,Compiler Errors,Pycharm,Breakpoints,调试程序时,每当调试器遇到断点(我已使用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 "

调试程序时,每当调试器遇到断点(我已使用
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'
回溯(最近一次呼叫最后一次):
文件“/Applications/PyCharm CE.app/Contents/helpers/pydev/pydev_frame.py”,第408行,跟踪调度中
self.doWaitSuspend(线程、帧、事件、参数)
文件“/Applications/PyCharm CE.app/Contents/helpers/pydev/pydev_frame.py”,第53行,在doWaitSuspend中
self._args[0].doWaitSuspend(*args,**kwargs)
文件“/Applications/PyCharm CE.app/Contents/helpers/pydev/pydev.py”,第1445行,在doWaitSuspend中
激活_函数()
文件“/Applications/PyCharm CE.app/Contents/helpers/pydev/pydev_ipython/matplotlibtools.py”,第136行,在activate_pylab中
pylab.show.\u needmain=False
AttributeError:“模块”对象没有属性“显示”
回溯(最近一次呼叫最后一次):
文件“/Applications/PyCharm CE.app/Contents/helpers/pydev/pydev.py”,第2357行,在
globals=debugger.run(setup['file'],None,None,is_模块)
文件“/Applications/PyCharm CE.app/Contents/helpers/pydev/pydev.py”,第1777行,运行中
pydev_imports.execfile(文件、全局、局部)#执行脚本
文件“/Users/pkillam/PycharmProjects/untitled/main.py”,第332行,在
profile.run(main())
文件“/Users/pkillam/PycharmProjects/untitled/main.py”,第225行,在main中
xyw_强度_数组、xywi_点_数组、x_目录、y_目录、w_目录=读取文件(输入_文件名[6])
readFile中的文件“/Users/pkillam/PycharmProjects/untitled/main.py”,第83行
如果(区域扫描):
readFile中的文件“/Users/pkillam/PycharmProjects/untitled/main.py”,第83行
如果(区域扫描):
文件“/Applications/PyCharm CE.app/Contents/helpers/pydev/pydev_frame.py”,第408行,跟踪调度中
self.doWaitSuspend(线程、帧、事件、参数)
文件“/Applications/PyCharm CE.app/Contents/helpers/pydev/pydev_frame.py”,第53行,在doWaitSuspend中
self._args[0].doWaitSuspend(*args,**kwargs)
文件“/Applications/PyCharm CE.app/Contents/helpers/pydev/pydev.py”,第1445行,在doWaitSuspend中
激活_函数()
文件“/Applications/PyCharm CE.app/Contents/helpers/pydev/pydev_ipython/matplotlibtools.py”,第136行,在activate_pylab中
pylab.show.\u needmain=False
AttributeError:“模块”对象没有属性“显示”

这种情况发生在代码中放置断点的任何一行。在那条线上总是会出错。关于其原因和/或解决方案,有什么想法吗?

有点明显,但我希望确保断点在语法上是正确的。如果你知道错误只发生在你放置断点的地方,那么它一定是你写出来的方式

有点明显,但我希望确保断点在语法上是正确的。如果你知道错误只发生在你放置断点的地方,那么它一定是你写出来的方式

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


重新安装或升级,错误应该会消失

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


重新安装或升级,错误应该会消失

我通过pycharm添加断点,如中所示,单击代码行旁边的一个红色圆圈,当调试器点击该行时,它暂停程序,以便您可以看到所有变量。这种断点。我通过pycharm添加断点,如中所示,单击代码行旁边的一个红色圆圈,当调试器点击该行时,它暂停程序,以便您可以看到所有变量。那种断点,我也有同样的问题。我一直在看JetBrains社区论坛,但找不到解决方案。我会向他们汇报,希望他们能给我一个解决方案。我也有同样的问题。我一直在看JetBrains社区论坛,但找不到解决方案。我会向他们汇报,希望他们能给我一个解决方案。