使用pudb和ipython时出错

时间:2012-05-09 18:29:08

标签: ipython pudb

我正在尝试使用PuDB和ipython作为shell,但是当我转到shell时,我收到以下错误:

can't set attribute
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File "/Library/Python/2.7/site-packages/IPython/core/interactiveshell.py", line 2744, in atexit_operations
    self.reset(new_session=False)
  File "/Library/Python/2.7/site-packages/IPython/core/interactiveshell.py", line 1132, in reset
    self.displayhook.flush()
  File "/Library/Python/2.7/site-packages/IPython/core/displayhook.py", line 255, in flush
    self.shell.user_ns['_oh'].clear()
KeyError: '_oh'
Error in sys.exitfunc:
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File "/Library/Python/2.7/site-packages/IPython/core/interactiveshell.py", line 2744, in atexit_operations
    self.reset(new_session=False)
  File "/Library/Python/2.7/site-packages/IPython/core/interactiveshell.py", line 1132, in reset
    self.displayhook.flush()
  File "/Library/Python/2.7/site-packages/IPython/core/displayhook.py", line 255, in flush
    self.shell.user_ns['_oh'].clear()
KeyError: '_oh'

版本详情:

  • PuDB 2011.3.1
  • IPython 0.12
  • Python 2.7.1
  • Mac OS X 10.7.3

1 个答案:

答案 0 :(得分:2)

这是known issue,应该在IPython 0.12.1或master中修复。更新到当前(0.12.1)IPython有帮助吗?