Bug 1125259 - [abrt] pylint: scoped_nodes.py:686:_is_metaclass:AttributeError: 'Module' object has no attribute '_type' [NEEDINFO]
Summary: [abrt] pylint: scoped_nodes.py:686:_is_metaclass:AttributeError: 'Module' obj...
Keywords:
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: Fedora
Classification: Fedora
Component: pylint
Version: 20
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Brian Lane
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:2aa484fd6f1e5ca37eb326e1417...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-31 12:48 UTC by michal novacek
Modified: 2014-10-16 23:42 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-10-16 23:42:56 UTC
bcl: needinfo? (mnovacek)


Attachments (Terms of Use)
File: backtrace (1.55 KB, text/plain)
2014-07-31 12:49 UTC, michal novacek
no flags Details
File: environ (3.95 KB, text/plain)
2014-07-31 12:49 UTC, michal novacek
no flags Details

Description michal novacek 2014-07-31 12:48:57 UTC
Version-Release number of selected component:
pylint-1.2-6.fc20

Additional info:
reporter:       libreport-2.2.3
cmdline:        /usr/bin/python /usr/bin/pylint '--msg-template={path}:{line}: [{msg_id}] {msg}' -r n scenarios/Apache.py --disable=C0103,W1201
dso_list:       python-astroid-1.1-3.fc20.noarch
executable:     /usr/bin/pylint
kernel:         3.14.4-200.fc20.x86_64
runlevel:       N 5
type:           Python
uid:            1000

Truncated backtrace:
scoped_nodes.py:686:_is_metaclass:AttributeError: 'Module' object has no attribute '_type'

Traceback (most recent call last):
  File "/usr/bin/pylint", line 9, in <module>
    load_entry_point('pylint==1.2.0', 'console_scripts', 'pylint')()
  File "/usr/lib/python2.7/site-packages/pylint/__init__.py", line 21, in run_pylint
    Run(sys.argv[1:])
  File "/usr/lib/python2.7/site-packages/pylint/lint.py", line 1047, in __init__
    linter.check(args)
  File "/usr/lib/python2.7/site-packages/pylint/lint.py", line 626, in check
    self.check_astroid_module(astroid, walker, rawcheckers, tokencheckers)
  File "/usr/lib/python2.7/site-packages/pylint/lint.py", line 712, in check_astroid_module
    walker.walk(astroid)
  File "/usr/lib/python2.7/site-packages/pylint/utils.py", line 715, in walk
    self.walk(child)
  File "/usr/lib/python2.7/site-packages/pylint/utils.py", line 712, in walk
    cb(astroid)
  File "/usr/lib/python2.7/site-packages/pylint/checkers/classes.py", line 249, in visit_class
    if node.type == 'class':
  File "/usr/lib/python2.7/site-packages/astroid/scoped_nodes.py", line 702, in _class_type
    if _is_metaclass(klass):
  File "/usr/lib/python2.7/site-packages/astroid/scoped_nodes.py", line 686, in _is_metaclass
    if baseobj._type == 'metaclass':
AttributeError: 'Module' object has no attribute '_type'

Local variables in innermost frame:
baseobj: <Module(scenarios.GenericTest) l.0 [scenarios.GenericTest] at Ox139f710>
base: <Name(GenericTest) l.12 [scenarios.Apache] at Ox109d150>
klass: <Class(Apache) l.12 [scenarios.Apache] at Ox10a2350>

Comment 1 michal novacek 2014-07-31 12:49:00 UTC
Created attachment 922908 [details]
File: backtrace

Comment 2 michal novacek 2014-07-31 12:49:01 UTC
Created attachment 922909 [details]
File: environ

Comment 3 Brian Lane 2014-07-31 22:04:39 UTC
Can you provide the file that is causing this, or a small test case?

I have reported this upstream:

https://bitbucket.org/logilab/astroid/issue/45/attributeerror-module-object-has-no

Comment 4 Brian Lane 2014-10-16 23:42:56 UTC
Feel free to reopen or report on the upstream bug if you have a simple way to reproduce this. Also try pylint-1.3.1 which is the current release.


Note You need to log in before you can comment on or make changes to this bug.