This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author marcin.bachry
Recipients marcin.bachry
Date 2008-10-07.14:37:54
SpamBayes Score 1.5458042e-08
Marked as misclassified No
Message-id <>
ast.fix_missing_locations() fails if any node is missing "_attributes"
instance variable - but it's the case of some fundamental nodes like
"alias" or "identifier".  When I run simple test:

  import ast
  with open(__file__) as fp:
      tree = ast.parse(

I get:

  $ python2.6 /tmp/ 
  Traceback (most recent call last):
    File "/tmp/", line 5, in <module>
    File "/usr/local/lib/python2.6/", line 133, in
      _fix(node, 1, 0)
    File "/usr/local/lib/python2.6/", line 132, in _fix
      _fix(child, lineno, col_offset)
    File "/usr/local/lib/python2.6/", line 132, in _fix
      _fix(child, lineno, col_offset)
    File "/usr/local/lib/python2.6/", line 121, in _fix
      if 'lineno' in node._attributes:
  AttributeError: 'alias' object has no attribute '_attributes'
Date User Action Args
2008-10-07 14:37:56marcin.bachrysetrecipients: + marcin.bachry
2008-10-07 14:37:56marcin.bachrysetmessageid: <>
2008-10-07 14:37:55marcin.bachrylinkissue4067 messages
2008-10-07 14:37:55marcin.bachrycreate