1

所以现在我将 python 从 2.7 更新到 2.7.2,我不能再在 emacs 中调用绳代码辅助。

import numpy as np
x = np.arange(0, 5, 0.1)

我有典型的rope 0.9.3、ropemode-0.1-rc2、pymacs 0.24-beta2、ropemacs 0.6

在执行 M-/ 或 Mx 绳代码辅助时,我在 python 2.7 中没有得到的 numpy 命名空间上得到以下跟踪:(sciPy 的处理相同;矛盾的是,matplotlib 仍然有效)

pymacs-report-error: Python: Traceback (most recent call last):
  <abridged>
  File "c:\devel\Python\2.7-bin\lib\site-packages\rope\base\ast.py", line 30, in walk
    return method(node)
  File "c:\devel\Python\2.7-bin\lib\site-packages\rope\base\evaluate.py", line 166, in _Call
    if '__new__' in pyobject:
  File "c:\devel\Python\2.7-bin\lib\site-packages\rope\base\pyobjects.py", line 32, in __contains__
    return key in self.get_attributes()
  File "c:\devel\Python\2.7-bin\lib\site-packages\rope\base\utils.py", line 10, in _wrapper
    setattr(self, name, func(self, *args, **kwds))
  File "c:\devel\Python\2.7-bin\lib\site-packages\rope\base\builtins.py", line 81, in get_attributes
    result = _object_attributes(self.builtin, self)
  File "c:\devel\Python\2.7-bin\lib\site-packages\rope\base\builtins.py", line 123, in _object_attributes
    child = getattr(obj, name)
AttributeError: __abstractmethods__
4

1 回答 1

1

这里有一个解决方案:https ://bitbucket.org/agr/rope/issue/15/crashes-with-attributeerror 。

另请参阅http://bugs.python.org/issue10006

于 2012-02-21T19:24:00.417 回答