You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to run 2to3 on Django, I get a traceback
File "/tmp/py3/lib/python3.0/lib2to3/refactor.py", line 260, in
refactor_string
self.refactor_tree(tree, name)
File "/tmp/py3/lib/python3.0/lib2to3/refactor.py", line 299, in
refactor_tree
self.traverse_by(self.post_order, tree.post_order())
File "/tmp/py3/lib/python3.0/lib2to3/refactor.py", line 323, in
traverse_by
new = fixer.transform(node, results)
File "/tmp/py3/lib/python3.0/lib2to3/fixes/fix_metaclass.py", line
156, in transform
for suite, i, stmt in find_metas(node):
File "/tmp/py3/lib/python3.0/lib2to3/fixes/fix_metaclass.py", line
114, in find_metas
if leaf_node.value == '__metaclass__':
AttributeError: 'Node' object has no attribute 'value'
Are you sure you run the latest 2to3? I ran it over docutils last night,
and while the version distributed with 2.6 failed with the same
exception, the current 2to3 from the sandbox worked.
loewis commented on Nov 24, 2008
loewismannequin
MannequinAuthor
More actions
Are you sure you run the latest 2to3? I ran it over docutils last night,
and while the version distributed with 2.6 failed with the same
exception, the current 2to3 from the sandbox worked.
I was using the one included in the py3k branch (in r67369), which goes
up to r66985 from the 2to3 project.
Activity
loewis commentedon Nov 24, 2008
When trying to run 2to3 on Django, I get a traceback
File "/tmp/py3/lib/python3.0/lib2to3/refactor.py", line 260, in
refactor_string
self.refactor_tree(tree, name)
File "/tmp/py3/lib/python3.0/lib2to3/refactor.py", line 299, in
refactor_tree
self.traverse_by(self.post_order, tree.post_order())
File "/tmp/py3/lib/python3.0/lib2to3/refactor.py", line 323, in
traverse_by
new = fixer.transform(node, results)
File "/tmp/py3/lib/python3.0/lib2to3/fixes/fix_metaclass.py", line
156, in transform
for suite, i, stmt in find_metas(node):
File "/tmp/py3/lib/python3.0/lib2to3/fixes/fix_metaclass.py", line
114, in find_metas
if leaf_node.value == '__metaclass__':
AttributeError: 'Node' object has no attribute 'value'
The smallest example reproducing this is
birkenfeld commentedon Nov 24, 2008
Are you sure you run the latest 2to3? I ran it over docutils last night,
and while the version distributed with 2.6 failed with the same
exception, the current 2to3 from the sandbox worked.
loewis commentedon Nov 24, 2008
I was using the one included in the py3k branch (in r67369), which goes
up to r66985 from the 2to3 project.
benjaminp commentedon Nov 24, 2008
Fixed in r67371.