Reputation: 11
I am using PyLint for years now and have just installed PyLint 1.2.1 on Python 2.7.6
When I am running PyLint 1.2.1 (within PyScripter 2.5.3) on any Python script, I get error log:
Command line: D:\PROGRA~1\Python27\python.exe D:\PROGRA~1\Python27\Lib\site-packages\pylint-1.2.1-py2.7.egg\pylint\lint.py "E:\test\dotnetver.py" --msg-template="{path}:{line}: [{msg_id}({symbol}), {obj}] {msg}"
Working directory:
Timeout: 0 ms
************* Module dotnetver
E:\test\dotnetver.py:2: [I0011(locally-disabled), ] Locally disabling missing-docstring (C0111)
No config file found, using default configuration
Traceback (most recent call last):
File "D:\PROGRA~1\Python27\Lib\site-packages\pylint-1.2.1-py2.7.egg\pylint\lint.py", line 1106, in <module>
Run(sys.argv[1:])
File "D:\PROGRA~1\Python27\Lib\site-packages\pylint-1.2.1-py2.7.egg\pylint\lint.py", line 1051, in __init__
linter.check(args)
File "D:\PROGRA~1\Python27\Lib\site-packages\pylint-1.2.1-py2.7.egg\pylint\lint.py", line 626, in check
self.check_astroid_module(astroid, walker, rawcheckers, tokencheckers)
File "D:\PROGRA~1\Python27\Lib\site-packages\pylint-1.2.1-py2.7.egg\pylint\lint.py", line 708, in check_astroid_module
checker.process_module(astroid)
File "D:\PROGRA~1\Python27\lib\site-packages\pylint-1.2.1-py2.7.egg\pylint\checkers\format.py", line 477, in process_module
if 'print_function' in module.future_imports:
AttributeError: 'Module' object has no attribute 'future_imports'
Process "Pylint" terminated, ExitCode: 00000001
Is this a Bug in the new PyLint version or have I missed something?
Upvotes: 1
Views: 4089
Reputation: 38492
if using Debian or its derivatives, you may need to specifically apt-get install python-astroid
. it wasn't one of the packages automatically updated by the install of pylint.
Upvotes: 0
Reputation: 11767
Upgrading astroid fixed this after a pylint upgrade
pip install --upgrade astroid
Upvotes: 3