我一直试图解决这个问题一段时间,但我无法解决它。我将 SublimeREPL 与 Sublime Text 3 一起使用。每当我尝试从 SublimeREPL 启动 Ipython shell 时,都会收到此错误:
Traceback (most recent call last):
File "/home/user/.config/sublime-text-3/Packages/SublimeREPL/config/Python/ipy_repl.py", line 51, in <module>
embedded_shell = ZMQTerminalIPythonApp(config=cfg, user_ns={})
File "/usr/lib/python2.7/dist-packages/IPython/core/application.py", line 150, in __init__
super(BaseIPythonApplication, self).__init__(**kwargs)
File "/usr/lib/python2.7/dist-packages/IPython/config/application.py", line 166, in __init__
SingletonConfigurable.__init__(self, **kwargs)
File "/usr/lib/python2.7/dist-packages/IPython/config/configurable.py", line 84, in __init__
self.config = config
File "/usr/lib/python2.7/dist-packages/IPython/utils/traitlets.py", line 307, in __set__
obj._notify_trait(self.name, old_value, new_value)
File "/usr/lib/python2.7/dist-packages/IPython/utils/traitlets.py", line 458, in _notify_trait
c(name, old_value, new_value)
File "/usr/lib/python2.7/dist-packages/IPython/config/application.py", line 176, in _config_changed
self.log.debug('Config changed:')
AttributeError: 'ZMQTerminalIPythonApp' object has no attribute 'log'
***Repl Closed***
问题似乎出在 application.py 模块中的这个 ZMGTerminalIPythonApp 对象上。当我从命令行加载它时,Ipython 工作得很好。
更新:所以我也尝试直接从命令行运行 ipy_repl.py 文件。我原以为它会失败,但它实际上工作得很好。我没有收到上面的错误。所以不清楚为什么从 ST3 调用 SublimeREPL 时出现上述错误,但是当我从命令行调用 SublimeREPL ipython shell 时,一切正常。
有没有其他人能够解决这个问题?