Skip to content
This repository was archived by the owner on Apr 22, 2025. It is now read-only.
This repository was archived by the owner on Apr 22, 2025. It is now read-only.

Traceback on trying a completion #14

Description

@rohdef

What steps will reproduce the problem?

  1. I have both a PYSMELLTAGS and PYSMELLTAGS.stdlib in the root directory
    of Trac trunk.
  2. I vim trac/ticket/query.py
  3. I do :setlocal omnifunc=pysmell#Complete
  4. I go to the bottom of the window, add a new line and at the beginning I
    add 'Query.' and then press CTRL-x CTRL-o and get this traceback after a
    bit of 'searching'.
    Looks like I can reproduce this 100%.

What is the expected output? What do you see instead?

I expected an overview of completions.
I got:

Traceback (most recent call last):
File "", line 9, in vimcompletePYSMELL
File
"/usr/local/lib/python2.5/site-packages/pysmell-0.7.3-py2.5.egg/pysmell/idehelper.py",
line 265, in detectCompletionType
klass, parents = inferInstance(fullPath, AST, lineNo, var, PYSMELLDICT)
File
"/usr/local/lib/python2.5/site-packages/pysmell-0.7.3-py2.5.egg/pysmell/idehelper.py",
line 105, in inferInstance
names, klasses = getNames(AST)
File
"/usr/local/lib/python2.5/site-packages/pysmell-0.7.3-py2.5.egg/pysmell/codefinder.py",
line 526, in getNames
compiler.walk(tree, inferer)
File "/usr/local/lib/python2.5/compiler/visitor.py", line 106, in walk
walker.preorder(tree, visitor)
File "/usr/local/lib/python2.5/compiler/visitor.py", line 63, in preorder
self.dispatch(tree, _args) # XXX *args make sense?
File "/usr/local/lib/python2.5/compiler/visitor.py", line 57, in dispatch
return meth(node, *args)
File "/usr/local/lib/python2.5/compiler/visitor.py", line 40, in default
self.dispatch(child, *args)
File "/usr/local/lib/python2.5/compiler/visitor.py", line 57, in dispatch
return meth(node, *args)
File "/usr/local/lib/python2.5/compiler/visitor.py", line 40, in default
self.dispatch(child, *args)
File "/usr/local/lib/python2.5/compiler/visitor.py", line 57, in dispatch
return meth(node, *args)
File
"/usr/local/lib/python2.5/site-packages/pysmell-0.7.3-py2.5.egg/pysmell/codefinder.py",
line 103, in decorated
self.handleChildren(args[0])
File
"/usr/local/lib/python2.5/site-packages/pysmell-0.7.3-py2.5.egg/pysmell/codefinder.py",
line 504, in handleChildren
BaseVisitor.handleChildren(self, node)
File
"/usr/local/lib/python2.5/site-packages/pysmell-0.7.3-py2.5.egg/pysmell/codefinder.py",
line 115, in handleChildren
self.visit(c)
File "/usr/local/lib/python2.5/compiler/visitor.py", line 57, in dispatch
return meth(node, *args)
File "/usr/local/lib/python2.5/compiler/visitor.py", line 40, in default
self.dispatch(child, *args)
File "/usr/local/lib/python2.5/compiler/visitor.py", line 57, in dispatch
return meth(node, *args)
File "/usr/local/lib/python2.5/compiler/visitor.py", line 40, in default
self.dispatch(child, *args)
File "/usr/local/lib/python2.5/compiler/visitor.py", line 57, in dispatch
return meth(node, *args)
File "/usr/local/lib/python2.5/compiler/visitor.py", line 40, in default
self.dispatch(child, *args)
File "/usr/local/lib/python2.5/compiler/visitor.py", line 57, in dispatch
return meth(node, *args)
File
"/usr/local/lib/python2.5/site-packages/pysmell-0.7.3-py2.5.egg/pysmell/codefinder.py",
line 102, in decorated
fun(self, *args, *_kwargs)
File
"/usr/local/lib/python2.5/site-packages/pysmell-0.7.3-py2.5.egg/pysmell/codefinder.py",
line 515, in visitAssign
self.names[name] = getName(node.expr)
File
"/usr/local/lib/python2.5/site-packages/pysmell-0.7.3-py2.5.egg/pysmell/codefinder.py",
line 296, in getName
return getNameTwo('%s(%s)', notArgs, node.args, rightJ=', ')
File
"/usr/local/lib/python2.5/site-packages/pysmell-0.7.3-py2.5.egg/pysmell/codefinder.py",
line 269, in getNameTwo
rightJ.join(map(getName, right)))
File
"/usr/local/lib/python2.5/site-packages/pysmell-0.7.3-py2.5.egg/pysmell/codefinder.py",
line 323, in getName
return '%s %r' % (' '.join(map(getName, node.getChildren()[:-1])),
rhs.value)
AttributeError: Name instance has no attribute 'value'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions