Hi,

I applied pylint to an old library written in our lab. pylint finds a lot of 
errors (quite expected) and then dies with the following traceback.

Traceback (most recent call last):
  File "/usr/local/bin/pylint", line 5, in <module>
    pkg_resources.run_script('pylint==0.20.0', 'pylint')
  File "build/bdist.freebsd-8.0-STABLE-i386/egg/pkg_resources.py", line 489, in 
run_script
  File "build/bdist.freebsd-8.0-STABLE-i386/egg/pkg_resources.py", line 1207, 
in run_script
  File 
"/usr/local/lib/python2.6/site-packages/pylint-0.20.0-py2.6.egg/EGG-INFO/scripts/pylint",
 line 4, in <module>
    lint.Run(sys.argv[1:])
  File 
"/usr/local/lib/python2.6/site-packages/pylint-0.20.0-py2.6.egg/pylint/lint.py",
 line 885, in __init__
    linter.check(args)
  File 
"/usr/local/lib/python2.6/site-packages/pylint-0.20.0-py2.6.egg/pylint/lint.py",
 line 496, in check
    self.check_astng_module(astng, checkers)
  File 
"/usr/local/lib/python2.6/site-packages/pylint-0.20.0-py2.6.egg/pylint/lint.py",
 line 573, in check_astng_module
    if implements(checker, IASTNGChecker)])
  File 
"/usr/local/lib/python2.6/site-packages/pylint-0.20.0-py2.6.egg/pylint/lint.py",
 line 590, in astng_events
    self.astng_events(child, checkers, _reversed_checkers)
  File 
"/usr/local/lib/python2.6/site-packages/pylint-0.20.0-py2.6.egg/pylint/lint.py",
 line 590, in astng_events
    self.astng_events(child, checkers, _reversed_checkers)
  File 
"/usr/local/lib/python2.6/site-packages/pylint-0.20.0-py2.6.egg/pylint/lint.py",
 line 590, in astng_events
    self.astng_events(child, checkers, _reversed_checkers)
  File 
"/usr/local/lib/python2.6/site-packages/pylint-0.20.0-py2.6.egg/pylint/lint.py",
 line 590, in astng_events
    self.astng_events(child, checkers, _reversed_checkers)
  File 
"/usr/local/lib/python2.6/site-packages/pylint-0.20.0-py2.6.egg/pylint/lint.py",
 line 587, in astng_events
    checker.visit(astng)
  File 
"/usr/local/lib/python2.6/site-packages/logilab_astng-0.20.0-py2.6.egg/logilab/astng/utils.py",
 line 307, in visit
    method(node)
  File 
"/usr/local/lib/python2.6/site-packages/pylint-0.20.0-py2.6.egg/pylint/checkers/typecheck.py",
 line 238, in visit_callfunc
    called = safe_infer(node.func)
  File 
"/usr/local/lib/python2.6/site-packages/pylint-0.20.0-py2.6.egg/pylint/checkers/utils.py",
 line 38, in safe_infer
    value = inferit.next()
  File 
"/usr/local/lib/python2.6/site-packages/logilab_astng-0.20.0-py2.6.egg/logilab/astng/bases.py",
 line 290, in wrapped
    for res in _func(node, context, **kwargs):
  File 
"/usr/local/lib/python2.6/site-packages/logilab_astng-0.20.0-py2.6.egg/logilab/astng/bases.py",
 line 314, in wrapper
    for node in func(*args, **kwargs):
  File 
"/usr/local/lib/python2.6/site-packages/logilab_astng-0.20.0-py2.6.egg/logilab/astng/inference.py",
 line 241, in infer_getattr
    for owner in self.expr.infer(context):
  File 
"/usr/local/lib/python2.6/site-packages/logilab_astng-0.20.0-py2.6.egg/logilab/astng/bases.py",
 line 290, in wrapped
    for res in _func(node, context, **kwargs):
  File 
"/usr/local/lib/python2.6/site-packages/logilab_astng-0.20.0-py2.6.egg/logilab/astng/bases.py",
 line 314, in wrapper
    for node in func(*args, **kwargs):
  File 
"/usr/local/lib/python2.6/site-packages/logilab_astng-0.20.0-py2.6.egg/logilab/astng/inference.py",
 line 247, in infer_getattr
    for obj in owner.igetattr(self.attrname, context):
  File 
"/usr/local/lib/python2.6/site-packages/logilab_astng-0.20.0-py2.6.egg/logilab/astng/bases.py",
 line 117, in _infer_stmts
    for infered in stmt.infer(context):
  File 
"/usr/local/lib/python2.6/site-packages/logilab_astng-0.20.0-py2.6.egg/logilab/astng/bases.py",
 line 290, in wrapped
    for res in _func(node, context, **kwargs):
  File 
"/usr/local/lib/python2.6/site-packages/logilab_astng-0.20.0-py2.6.egg/logilab/astng/bases.py",
 line 117, in _infer_stmts
    for infered in stmt.infer(context):
  File 
"/usr/local/lib/python2.6/site-packages/logilab_astng-0.20.0-py2.6.egg/logilab/astng/bases.py",
 line 290, in wrapped
    for res in _func(node, context, **kwargs):
  File 
"/usr/local/lib/python2.6/site-packages/logilab_astng-0.20.0-py2.6.egg/logilab/astng/inference.py",
 line 357, in infer_binop
    for val in _infer_binop(self.op, lhs, self.right, context, failures):
  File 
"/usr/local/lib/python2.6/site-packages/logilab_astng-0.20.0-py2.6.egg/logilab/astng/inference.py",
 line 340, in _infer_binop
    for valnode in operand1.infer_binary_op(operator, operand2, context):
  File 
"/usr/local/lib/python2.6/site-packages/logilab_astng-0.20.0-py2.6.egg/logilab/astng/bases.py",
 line 304, in wrapper
    for node in func(*args, **kwargs):
  File 
"/usr/local/lib/python2.6/site-packages/logilab_astng-0.20.0-py2.6.egg/logilab/astng/protocols.py",
 line 99, in const_infer_binary_op
    for val in other.infer_binary_op(operator, self, context):
  File 
"/usr/local/lib/python2.6/site-packages/logilab_astng-0.20.0-py2.6.egg/logilab/astng/bases.py",
 line 304, in wrapper
    for node in func(*args, **kwargs):
  File 
"/usr/local/lib/python2.6/site-packages/logilab_astng-0.20.0-py2.6.egg/logilab/astng/protocols.py",
 line 119, in tl_infer_binary_op
    if not n is YES] * other.value
TypeError: can't multiply sequence by non-int of type 'NoneType'

The file is available upon request (it's 80KB, 2561 lines, I could not extract 
a short part triggering the bug).

--
Vladimir Chukharev
Tampere University of Technology
_______________________________________________
Python-Projects mailing list
[email protected]
http://lists.logilab.org/mailman/listinfo/python-projects

Reply via email to