[pypy-issue] [issue1680] ast.NodeTransformer throws AttributeError in pypy only

dmlockhart tracker at bugs.pypy.org
Wed Jan 22 22:06:47 CET 2014


New submission from dmlockhart <dmlockhart+pypy at gmail.com>:

I have some code which performs transformations of python ast objects.  The code 
executes as expected in CPython 2.7, but when run with the pypy interpreter, I 
receive the following traceback:

Traceback (most recent call last):
  File "app_main.py", line 72, in run_toplevel
  File "ast_exception_bug.py", line 47, in <module>
    new_tree = RemoveSelf().visit( tree )
  File "/Users/dmlockhart/venvs/pypy-2.0.2/lib-python/2.7/ast.py", line 241, in 
visit
    return visitor(node)
  File "/Users/dmlockhart/venvs/pypy-2.0.2/lib-python/2.7/ast.py", line 297, in 
generic_visit
    value = self.visit(value)
  File "/Users/dmlockhart/venvs/pypy-2.0.2/lib-python/2.7/ast.py", line 241, in 
visit
    return visitor(node)
  File "/Users/dmlockhart/venvs/pypy-2.0.2/lib-python/2.7/ast.py", line 297, in 
generic_visit
    value = self.visit(value)
  File "/Users/dmlockhart/venvs/pypy-2.0.2/lib-python/2.7/ast.py", line 241, in 
visit
    return visitor(node)
  File "/Users/dmlockhart/venvs/pypy-2.0.2/lib-python/2.7/ast.py", line 297, in 
generic_visit
    value = self.visit(value)
  File "/Users/dmlockhart/venvs/pypy-2.0.2/lib-python/2.7/ast.py", line 241, in 
visit
    return visitor(node)
  File "/Users/dmlockhart/venvs/pypy-2.0.2/lib-python/2.7/ast.py", line 308, in 
generic_visit
    delattr(node, field)
AttributeError: cannot delete attribute




Platform: OSX Mavericks

Interpreters Tested:
pypy-2.0.2
pypy-2.1

----------
files: ast_exception_bug.py
messages: 6505
nosy: dmlockhart, pypy-issue
priority: bug
status: unread
title: ast.NodeTransformer throws AttributeError in pypy only

________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue1680>
________________________________________


More information about the pypy-issue mailing list