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

Parse error at or near 'MAKE_CLOSURE_A_2_0' instruction at offset #426

Open
hibernous opened this issue Jan 13, 2023 · 4 comments
Open

Parse error at or near 'MAKE_CLOSURE_A_2_0' instruction at offset #426

hibernous opened this issue Jan 13, 2023 · 4 comments
Labels
Overly large bytecode Bytecode is too large to try to debug. Whittle the bytecode down to a reasonable size Python 3.4

Comments

@hibernous
Copy link

during decompilation issue was appeared as on subject

L. 214 180 LOAD_GLOBAL BcpDevice
183 LOAD_GLOBAL bool
186 LOAD_CONST ('dev', 'has_a_second_attempt')
189 LOAD_CLOSURE 'self'
192 BUILD_TUPLE_1 1
-> 195 LOAD_CODE <code_object attempt_bcp1_communication>
198 LOAD_STR 'Device.probe..attempt_bcp1_communication'
201 MAKE_CLOSURE_A_3_0 '0 positional, 0 keyword only, 3 annotated'
207 STORE_FAST 'attempt_bcp1_communication'
Instruction context:

L. 872 36 LOAD_NAME str
39 LOAD_CONST ('name',)
42 LOAD_CLOSURE 'class'
45 BUILD_TUPLE_1 1
48 LOAD_CODE <code_object remove_device>
51 LOAD_STR 'EzContext.remove_device'
-> 54 MAKE_CLOSURE_A_2_0 '0 positional, 0 keyword only, 2 annotated'
60 STORE_NAME remove_device
63 LOAD_CLOSURE 'class'
66 RETURN_VALUE

version: uncompyle6 master

file tried to decompile:
ezbionx.zip

@rocky
Copy link
Owner

rocky commented Jan 14, 2023

This is too long to deal with. I'll wait until someone (which could be you) comes up with a smaller example.

@rocky rocky added Python 3.4 Overly large bytecode Bytecode is too large to try to debug. Whittle the bytecode down to a reasonable size labels Jan 14, 2023
@hibernous
Copy link
Author

sure... thanks for looking at this - I will try to do on smaller piece of code

@hibernous
Copy link
Author

hibernous commented Jan 14, 2023

I finished decompilation using couple of methods - this is a class which generates error:

`

def __init__(self, bridge):
    Context.__init__(self, bridge)
    self.bcp3_manager = EzBcp3(self)

def terminate(self):
    self.bcp3_manager.terminate()
    del self.bcp3_manager

def remove_device(self, name, device):
    try:
        self.bcp3_manager.remove_device(device)
    except:
        logger.exception('Failed to remove device <%s> from BCP3 manager' % name)
    super().remove_device(name, device)

`
I guess 'super()' method is a key.

@rocky
Copy link
Owner

rocky commented Jan 14, 2023

You guessed wrong, and isn't a forum for guessing games.

Write a Python 3.4, program, bytecompile it, then run uncompyle6 on it. If it comes back with an error you have something that's reportable bug.

If it comes back with the same bytecode and the same error then you have definitely won!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Overly large bytecode Bytecode is too large to try to debug. Whittle the bytecode down to a reasonable size Python 3.4
Projects
None yet
Development

No branches or pull requests

2 participants