Decompiled code generates NameError
kholia opened this issue · 3 comments
with <censored> as _, curs:
NameError: global name 'curs' is not defined
File Link : http://dl.dropbox.com/u/1522424/pyc-NameError.tar
I don't see this error. How can I reproduce it?
On Sat, Mar 16, 2013 at 12:00 AM, Dhiru Kholia notifications@github.comwrote:
with as _, curs:
NameError: global name 'curs' is not definedFile Link : http://dl.dropbox.com/u/1522424/pyc-NameError.tar
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/25
.
I realize now that it will be hard for you to reproduce this error. In short, uncompyle2 generates code which look like,
with [1, 2] as _, top:
pass
However, this code results in,
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: __exit__
Search for lines which look like "with as _, curs" in the decompiled code and these lines are causing problems (AttributeError / NameError).
I'm still not sure what the problem is without being able to reproduce it.
I did fix another bug that affected that file, but I don't think it's connected. It might be worth trying though.