Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

local variable 'n' referenced before assignment #32

Open
tutorial0 opened this issue Apr 14, 2016 · 2 comments
Open

local variable 'n' referenced before assignment #32

tutorial0 opened this issue Apr 14, 2016 · 2 comments

Comments

@tutorial0
Copy link

Hi, i got this error when i use uncompyle2:

Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/uncompyle2/init.py", line 203, in main
uncompyle_file(infile, outstream, showasm, showast)
File "/Library/Python/2.7/site-packages/uncompyle2/init.py", line 140, in uncompyle_file
uncompyle(version, co, outstream, showasm, showast)
File "/Library/Python/2.7/site-packages/uncompyle2/init.py", line 102, in uncompyle
tokens, customize = scanner.disassemble(co)
File "/Library/Python/2.7/site-packages/uncompyle2/scanner26.py", line 38, in disassemble
self.code = array('B', co.co_code[:n])
UnboundLocalError: local variable 'n' referenced before assignment

This pyc code is written with python 2.6. Can you help fix this? Thanks

@caot
Copy link

caot commented Apr 14, 2016

@rocky
Copy link

rocky commented Apr 14, 2016

What uncompile6 (or probably any project) will need to track this down is the 2.6 bytecode. Maybe you can set that up as a gist. And since @caot remarks, that's another interesting idea: maybe you can get a disassembly, using pycdc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants