Pylint crashes if the word "coding" is used as keyword argument

Bug #780014 reported by Joshua Hopp
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pylint (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: pylint

Example code:

--- pylint.py --------------------------
def do_something(a_word_with_coding=None):
    pass
----------------------------------------

Now run pylint:

user@localhost:~$ pylint pylint.py
No config file found, using default configuration
Traceback (most recent call last):
  File "/usr/bin/pylint", line 4, in <module>
    lint.Run(sys.argv[1:])
  File "/usr/lib/pymodules/python2.7/pylint/lint.py", line 860, in __init__
    linter.check(args)
  File "/usr/lib/pymodules/python2.7/pylint/lint.py", line 493, in check
    self.check_astng_module(astng, walker, rawcheckers)
  File "/usr/lib/pymodules/python2.7/pylint/lint.py", line 563, in check_astng_module
    checker.process_module(astng)
  File "/usr/lib/pymodules/python2.7/pylint/checkers/format.py", line 191, in process_module
    self.process_tokens(tokenize.generate_tokens(readline))
  File "/usr/lib/pymodules/python2.7/pylint/checkers/format.py", line 218, in process_tokens
    for (tok_type, token, start, _, line) in tokens:
  File "/usr/lib/python2.7/tokenize.py", line 288, in generate_tokens
    line = readline()
  File "/usr/lib/pymodules/python2.7/pylint/checkers/format.py", line 190, in <lambda>
    readline = lambda: stream.readline().decode(node.file_encoding, 'replace')
LookupError: unknown encoding: None):

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: pylint 0.23.0-1
ProcVersionSignature: Ubuntu 2.6.38-8.42-generic 2.6.38.2
Uname: Linux 2.6.38-8-generic x86_64
NonfreeKernelModules: nvidia
Architecture: amd64
Date: Mon May 9 18:14:40 2011
PackageArchitecture: all
ProcEnviron:
 LANGUAGE=de_DE:en
 PATH=(custom, no user)
 LANG=de_DE.UTF-8
 SHELL=/bin/bash
SourcePackage: pylint
UpgradeStatus: Upgraded to natty on 2011-05-04 (4 days ago)

Revision history for this message
Joshua Hopp (joshuahopp) wrote :
Revision history for this message
Hans Joachim Desserud (hjd) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. This issue is still reproducible in Ubuntu 11.10 (which have the same version of pylint which this bug was filed against). However, I am closing it because it is fixed in version 0.25.0-1ubuntu1 available in Ubuntu 12.04 (and presumably later releases).

 If you need a fix for the bug in previous versions of Ubuntu, please follow the instructions for "Requesting a Backport" at https://wiki.ubuntu.com/UbuntuBackports#Requesting_a_Backport

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.