Email [Python-projects] Exception during pylint analysis

subject
[Python-projects] Exception during pylint analysis
date
2006/02/14 10:49
Hi,

I just installed pylint and tried to run it on a set of files I am
working on. They are organised as a module and the analysis breaks with
the following error message:

Traceback (most recent call last):
  File "D:\Program Files\Python\Scripts\pylint.bat", line 12, in ?
    lint.Run(sys.argv[1:])
  File "D:\Program Files\Python\Lib\site-packages\pylint\lint.py", line
773, in __init__
    linter.check(args)
  File "D:\Program Files\Python\Lib\site-packages\pylint\lint.py", line
435, in check
    self.check_file(filepath, modname, checkers)
  File "D:\Program Files\Python\Lib\site-packages\pylint\lint.py", line
459, in check_file
    self._check_file(filepath, modname, checkers)
  File "D:\Program Files\Python\Lib\site-packages\pylint\lint.py", line
473, in _check_file
    self.check_astng_module(astng, checkers)
  File "D:\Program Files\Python\Lib\site-packages\pylint\lint.py", line
517, in check_astng_module
    self.astng_events(astng, [checker for checker in checkers
  File "D:\Program Files\Python\Lib\site-packages\pylint\lint.py", line
534, in astng_events
    self.astng_events(child, checkers, _reversed_checkers)
  File "D:\Program Files\Python\Lib\site-packages\pylint\lint.py", line
534, in astng_events
    self.astng_events(child, checkers, _reversed_checkers)
  File "D:\Program Files\Python\Lib\site-packages\pylint\lint.py", line
534, in astng_events
    self.astng_events(child, checkers, _reversed_checkers)
  File "D:\Program Files\Python\Lib\site-packages\pylint\lint.py", line
534, in astng_events
    self.astng_events(child, checkers, _reversed_checkers)
  File "D:\Program Files\Python\Lib\site-packages\pylint\lint.py", line
534, in astng_events
    self.astng_events(child, checkers, _reversed_checkers)
  File "D:\Program Files\Python\Lib\site-packages\pylint\lint.py", line
534, in astng_events
    self.astng_events(child, checkers, _reversed_checkers)
  File "D:\Program Files\Python\Lib\site-packages\pylint\lint.py", line
534, in astng_events
    self.astng_events(child, checkers, _reversed_checkers)
  File "D:\Program Files\Python\Lib\site-packages\pylint\lint.py", line
536, in astng_events
    checker.leave(astng)
  File "D:\Program
Files\Python\Lib\site-packages\logilab\astng\utils.py", line 92, in
leave
    method(node)
  File "D:\Program
Files\Python\Lib\site-packages\pylint\checkers\variables.py", line 322,
in leave_getattr
    module = node.expr.infer().next()
  File "D:\Program
Files\Python\Lib\site-packages\logilab\astng\inference.py", line 63, in
wrapped
    for res in _func(node, name, path, **kwargs):
  File "D:\Program
Files\Python\Lib\site-packages\logilab\astng\inference.py", line 81, in
_infer_stmts
    for infered in stmt.infer(stmt._infer_name(frame, name), path):
  File "D:\Program
Files\Python\Lib\site-packages\logilab\astng\inference.py", line 63, in
wrapped
    for res in _func(node, name, path, **kwargs):
  File "D:\Program
Files\Python\Lib\site-packages\logilab\astng\inference.py", line 81, in
_infer_stmts
    for infered in stmt.infer(stmt._infer_name(frame, name), path):
  File "D:\Program
Files\Python\Lib\site-packages\logilab\astng\inference.py", line 63, in
wrapped
    for res in _func(node, name, path, **kwargs):
  File "D:\Program
Files\Python\Lib\site-packages\logilab\astng\inference.py", line 187, in
infer_getattr
    for owner in self.expr.infer(name, path):
  File "D:\Program
Files\Python\Lib\site-packages\logilab\astng\inference.py", line 63, in
wrapped
    for res in _func(node, name, path, **kwargs):
  File "D:\Program
Files\Python\Lib\site-packages\logilab\astng\inference.py", line 187, in
infer_getattr
    for owner in self.expr.infer(name, path):
  File "D:\Program
Files\Python\Lib\site-packages\logilab\astng\inference.py", line 63, in
wrapped
    for res in _func(node, name, path, **kwargs):
  File "D:\Program
Files\Python\Lib\site-packages\logilab\astng\inference.py", line 171, in
infer_callfunc
    for infered in callee.infer_call_result(self, path):
  File "D:\Program
Files\Python\Lib\site-packages\logilab\astng\inference.py", line 265, in
infer_call_result_function
    for infered in _infer_stmts(imap(lambda n:n.value, returns),
path=inf_path):
  File "D:\Program
Files\Python\Lib\site-packages\logilab\astng\inference.py", line 81, in
_infer_stmts
    for infered in stmt.infer(stmt._infer_name(frame, name), path):
  File "D:\Program
Files\Python\Lib\site-packages\logilab\astng\inference.py", line 63, in
wrapped
    for res in _func(node, name, path, **kwargs):
  File "D:\Program
Files\Python\Lib\site-packages\logilab\astng\inference.py", line 196, in
infer_getattr
    for obj in _infer_stmts(stmts, path=path):
  File "D:\Program
Files\Python\Lib\site-packages\logilab\astng\inference.py", line 81, in
_infer_stmts
    for infered in stmt.infer(stmt._infer_name(frame, name), path):
  File "D:\Program
Files\Python\Lib\site-packages\logilab\astng\inference.py", line 63, in
wrapped
    for res in _func(node, name, path, **kwargs):
  File "D:\Program
Files\Python\Lib\site-packages\logilab\astng\inference.py", line 251, in
infer_global
    yield self.root().resolve(name)
  File "D:\Program
Files\Python\Lib\site-packages\logilab\astng\nodes.py", line 273, in
resolve
    frame, stmts = self.lookup_name(name)
  File "D:\Program
Files\Python\Lib\site-packages\logilab\astng\nodes.py", line 227, in
lookup_name
    assert ID_RGX.match(name), '%r is not a valid identifier' % name
TypeError: expected string or buffer

Any idea why a file would cause such an exception??

Regards,

Anne Lambert

_______________________________________________
Python-Projects mailing list
Python-Projects@lists.logilab.org
http://lists.logilab.org/mailman/listinfo/python-projects