Sometimes when I run pylint recursively on a project, it crashes in the middle.
Running it manually on all files works.
Here's an example of a stack trace:
Traceback (most recent call last):
File "/opt/xpyv/bin/pylint", line 5, in <module>
pkg_resources.run_script('pylint==0.22.0', 'pylint')
File "build/bdist.linux-i686/egg/pkg_resources.py", line 448, in run_script
File "build/bdist.linux-i686/egg/pkg_resources.py", line 1166, in run_script
File "/opt/xpyv/lib/python2.6/site-packages/pylint-0.22.0-py2.6.egg/EGG-INFO/scripts/pylint", line 4, in <module>
lint.Run(sys.argv[1:])
File "/opt/xpyv/lib/python2.6/site-packages/pylint-0.22.0-py2.6.egg/pylint/lint.py", line 858, in __init__
linter.check(args)
File "/opt/xpyv/lib/python2.6/site-packages/pylint-0.22.0-py2.6.egg/pylint/lint.py", line 489, in check
self.check_astng_module(astng, walker, rawcheckers)
File "/opt/xpyv/lib/python2.6/site-packages/pylint-0.22.0-py2.6.egg/pylint/lint.py", line 563, in check_astng_module
walker.walk(astng)
File "/opt/xpyv/lib/python2.6/site-packages/pylint-0.22.0-py2.6.egg/pylint/utils.py", line 520, in walk
self.walk(child)
File "/opt/xpyv/lib/python2.6/site-packages/pylint-0.22.0-py2.6.egg/pylint/utils.py", line 520, in walk
self.walk(child)
File "/opt/xpyv/lib/python2.6/site-packages/pylint-0.22.0-py2.6.egg/pylint/utils.py", line 517, in walk
cb(astng)
File "/opt/xpyv/lib/python2.6/site-packages/pylint-0.22.0-py2.6.egg/pylint/checkers/base.py", line 632, in visit_function
self._recursive_check_names(args, node)
File "/opt/xpyv/lib/python2.6/site-packages/pylint-0.22.0-py2.6.egg/pylint/checkers/base.py", line 655, in _recursive_check_names
self._recursive_check_names(arg.elts, node)
File "/opt/xpyv/lib/python2.6/site-packages/logilab_astng-0.21.0-py2.6.egg/logilab/astng/bases.py", line 73, in __getattr__
return getattr(self._proxied, name)
AttributeError: 'Class' object has no attribute 'elts'
|
Comments
-
2010/12/07 22:31, written by sthenault
-
2010/12/09 14:06, written by johnnymta
-
2010/12/09 14:36, written by johnnymta
add commentimportant part of the error is missing, eg the actual error...
Also, is there any chance for you to produce a minimal case causing the pb
and making source available?
Oops, terribly sorry about this.
I accidentally omitted the last line.
Fixed now.
I will try to find source code I can make available that's producing the bug...
OK OK, turns out it's not a recursive thing bug, it's a specific strange thing in one of the source codes that caused it to crash (and I didn't see the crash when ran it recursively, I guess...)
The code (which is weird, I admit, but still - pylint shouldn't crash...):
class MyClass(object):
def __init__(self, True):
pass