What steps will reproduce the problem?
- I have both a PYSMELLTAGS and PYSMELLTAGS.stdlib in the root directory
of Trac trunk.
- I vim trac/ticket/query.py
- I do :setlocal omnifunc=pysmell#Complete
- 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'
What steps will reproduce the problem?
of Trac trunk.
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'