JulianEberius/SublimeRope — Issue #6: frequent traceback on autocomplete
Author: glyph
Created: 2011-12-29 03:39:03+00:00
State: open

I'm not sure what the difference is between when I see this and when autocompletion just works, but I frequently see this in my log:

Traceback (most recent call last):
File "./sublime_plugin.py", line 175, in on_query_completions
File "./python_completions.py", line 64, in on_query_completions
context.project, context.input, loc, context.resource)
File "/home/glyph/.config/sublime-text-2/Packages/SublimeRope/rope/contrib/codeassist.py", line 33, in code_assist
return assist()
File "/home/glyph/.config/sublime-text-2/Packages/SublimeRope/rope/contrib/codeassist.py", line 325, in __call__
completions = list(self._code_completions().values())
File "/home/glyph/.config/sublime-text-2/Packages/SublimeRope/rope/contrib/codeassist.py", line 408, in _code_completions
self._undotted_completions(inner_scope, result, lineno=lineno)
File "/home/glyph/.config/sublime-text-2/Packages/SublimeRope/rope/contrib/codeassist.py", line 351, in _undotted_completions
names = scope.get_names()
File "/home/glyph/.config/sublime-text-2/Packages/SublimeRope/rope/base/pyscopes.py", line 16, in get_names
return self.pyobject.get_attributes()
File "/home/glyph/.config/sublime-text-2/Packages/SublimeRope/rope/base/pyobjects.py", line 196, in get_attributes
result = dict(self._get_concluded_attributes())
File "/home/glyph/.config/sublime-text-2/Packages/SublimeRope/rope/base/utils.py", line 25, in newfunc
return func(self, *args, **kwds)
File "/home/glyph/.config/sublime-text-2/Packages/SublimeRope/rope/base/pyobjects.py", line 191, in _get_concluded_attributes
self.concluded_attributes.set(self._create_concluded_attributes())
File "/home/glyph/.config/sublime-text-2/Packages/SublimeRope/rope/base/pyobjectsdef.py", line 127, in _create_concluded_attributes
for base in reversed(self.get_superclasses()):
File "/home/glyph/.config/sublime-text-2/Packages/SublimeRope/rope/base/pyobjectsdef.py", line 119, in get_superclasses
self._superclasses.set(self._get_bases())
File "/home/glyph/.config/sublime-text-2/Packages/SublimeRope/rope/base/pyobjectsdef.py", line 135, in _get_bases
base_name)
File "/home/glyph/.config/sublime-text-2/Packages/SublimeRope/rope/base/evaluate.py", line 25, in eval_node
return eval_node2(scope, node)[1]
File "/home/glyph/.config/sublime-text-2/Packages/SublimeRope/rope/base/evaluate.py", line 30, in eval_node2
ast.walk(node, evaluator)
File "/home/glyph/.config/sublime-text-2/Packages/SublimeRope/rope/base/ast.py", line 34, in walk
return method(node)
File "/home/glyph/.config/sublime-text-2/Packages/SublimeRope/rope/base/evaluate.py", line 150, in _Attribute
if pyname.get_object() != rope.base.pyobjects.get_unknown():
File "/home/glyph/.config/sublime-text-2/Packages/SublimeRope/rope/base/utils.py", line 25, in newfunc
return func(self, *args, **kwds)
File "/home/glyph/.config/sublime-text-2/Packages/SublimeRope/rope/base/pynames.py", line 158, in get_object
return self._get_imported_pyname().get_object()
File "/home/glyph/.config/sublime-text-2/Packages/SublimeRope/rope/base/pynames.py", line 149, in _get_imported_pyname
result = self.imported_module.get_object()[self.imported_name]
File "/home/glyph/.config/sublime-text-2/Packages/SublimeRope/rope/base/pyobjects.py", line 28, in __getitem__
return self.get_attribute(key)
File "/home/glyph/.config/sublime-text-2/Packages/SublimeRope/rope/base/pyobjects.py", line 202, in get_attribute
if name in self._get_structural_attributes():
File "/home/glyph/.config/sublime-text-2/Packages/SublimeRope/rope/base/utils.py", line 25, in newfunc
return func(self, *args, **kwds)
File "/home/glyph/.config/sublime-text-2/Packages/SublimeRope/rope/base/pyobjects.py", line 184, in _get_structural_attributes
self.structural_attributes = self._create_structural_attributes()
File "/home/glyph/.config/sublime-text-2/Packages/SublimeRope/rope/base/pyobjectsdef.py", line 225, in _create_structural_attributes
extension_submodules = self.pycore._builtin_submodules(modname)
File "/home/glyph/.config/sublime-text-2/Packages/SublimeRope/rope/base/pycore.py", line 88, in _builtin_submodules
for extension in self.extension_modules:
File "/home/glyph/.config/sublime-text-2/Packages/SublimeRope/rope/base/utils.py", line 10, in _wrapper
setattr(self, name, func(self, *args, **kwds))
File "/home/glyph/.config/sublime-text-2/Packages/SublimeRope/rope/base/pycore.py", line 294, in extension_modules
result.update(stdmods.dynload_modules())
File "/home/glyph/.config/sublime-text-2/Packages/SublimeRope/rope/base/utils.py", line 74, in __call__
result = self.func(*args, **kwds)
File "/home/glyph/.config/sublime-text-2/Packages/SublimeRope/rope/base/stdmods.py", line 33, in dynload_modules
dynload_path = os.path.join(_stdlib_path(), 'lib-dynload')
File "/home/glyph/.config/sublime-text-2/Packages/SublimeRope/rope/base/stdmods.py", line 8, in _stdlib_path
import distutils.sysconfig
ImportError: No module named distutils.sysconfig