【发布时间】:2015-10-14 13:38:41
【问题描述】:
在调试我的程序时,只要调试器遇到断点(我已经使用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'
这发生在我在代码中放置断点的任何地方。它总是会在该行出错。关于其原因和/或解决方案的任何想法?
【问题讨论】:
-
我遇到了同样的问题。我一直在查看 JetBrains 社区论坛,但找不到解决方案。我会向他们报告,希望他们能给我一个解决方案。
标签: python debugging compiler-errors pycharm breakpoints