pylint crashes on default values of a custom constant type

Bug #1157395 reported by Vincent Povirk on 2013-03-19
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pylint (Ubuntu)
Undecided
Unassigned

Bug Description

I'm getting the following exception when running pylint on my code:

Traceback (most recent call last):
  File "/usr/bin/pylint", line 3, in <module>
    run_pylint()
  File "/usr/lib/python2.7/dist-packages/pylint/__init__.py", line 21, in run_pylint
    Run(sys.argv[1:])
  File "/usr/lib/python2.7/dist-packages/pylint/lint.py", line 929, in __init__
    linter.check(args)
  File "/usr/lib/python2.7/dist-packages/pylint/lint.py", line 542, in check
    self.check_astng_module(astng, walker, rawcheckers)
  File "/usr/lib/python2.7/dist-packages/pylint/lint.py", line 615, in check_astng_module
    walker.walk(astng)
  File "/usr/lib/python2.7/dist-packages/pylint/utils.py", line 556, in walk
    self.walk(child)
  File "/usr/lib/python2.7/dist-packages/pylint/utils.py", line 553, in walk
    cb(astng)
  File "/usr/lib/python2.7/dist-packages/pylint/checkers/base.py", line 452, in visit_function
    if value.qname() == '__builtin__.set':
  File "/usr/lib/python2.7/dist-packages/logilab/astng/bases.py", line 51, in __getattr__
    return getattr(self._proxied, name)
  File "/usr/lib/python2.7/dist-packages/logilab/astng/raw_building.py", line 340, in _set_proxied
    return _CONST_PROXY[const.value.__class__]
KeyError: <class 'gtk._gtk.ButtonsType'>

I have attached a small test case.

ProblemType: Bug
DistroRelease: Ubuntu 13.04
Package: pylint 0.26.0-1ubuntu1
ProcVersionSignature: Ubuntu 3.8.0-11.20-generic 3.8.2
Uname: Linux 3.8.0-11-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.9-0ubuntu2
Architecture: amd64
Date: Tue Mar 19 14:53:27 2013
InstallationDate: Installed on 2010-10-11 (890 days ago)
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release amd64 (20101007)
MarkForUpload: True
PackageArchitecture: all
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: pylint
UpgradeStatus: Upgraded to raring on 2012-12-10 (98 days ago)

Vincent Povirk (madewokherd) wrote :
Hans Joachim Desserud (hjd) wrote :

Thanks for reporting this issue and help making Ubuntu better.

I get the same error message when running pylint on your example file on Ubuntu Raring.

Changed in pylint (Ubuntu):
status: New → Confirmed
sthenault (sylvain-thenault) wrote :

this bug should be fixed by forthcoming logilab-astng release (0.24.3 or 0.25.0)

Hans Joachim Desserud (hjd) wrote :

Pylint 1.1.0-1 on Ubuntu 14.04 handles the example file without crashing. Thus, I'm marking this issue as fixed.

Changed in pylint (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers