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

Unsupported opcode: BEGIN_FINALLY #188

Closed
keyvanvafaee opened this issue Nov 10, 2020 · 4 comments
Closed

Unsupported opcode: BEGIN_FINALLY #188

keyvanvafaee opened this issue Nov 10, 2020 · 4 comments

Comments

@keyvanvafaee
Copy link

# Source Generated with Decompyle++
# File: goz.pyc (Python 3.8)

Unsupported opcode: BEGIN_FINALLY
import re
import os
import sys
import pkg_resources
import random
# WARNING: Decompyle incomplete

python version : 3.8
os : windows

i also attached.pycfile
mypyc.zip

@cyberZvezd
Copy link

cyberZvezd commented May 4, 2021

What I understand that there are no functions for BEGIN_FINALLY, CALL_FINALLY_A, POP_FINALLY_A, WITH_CLEANUP_START, WITH_CLEANUP_FINISH in file ASTree.cpp.
Thats why there are error like Unsupported opcode: BEGIN_FINALLY and decompyle can not be completed...
It would be nice if these functions can be added to new version...

@retsyo
Copy link

retsyo commented Jun 23, 2021

any step-by-step instrunction to teach how to add the unsupported opcode?

@rocky
Copy link

rocky commented Jun 23, 2021

Here is my take on this, but I am not the any of the authors of this and have not contributed to the code. I am a casual on-looker possibly like you.

If the opcode were similar to other opcodes then things would be easy. I am pretty sure that's not the case here or else someone would have probably done already.

But see how the other similar opcodes are handled and try make the adjustments suggested by the code where things are the same and things are different.

For example suppose + were there but - weren't; then I think looking at the code for + you'd easily understand what to do. I would imagine somewhere there is the "add" part is handled, and then you'd change that to be a "subtract" kind of thing instead.

Probably the place to start would be understand what the opcode that is being added does. This is described in the opcodes section of the Python doc for a given version. (I expect you'll know how to find that or google it.)

Look to see how that differs from whatever opcode is close in the previous version of python. Maybe for experimentation just change that opcode name from the old name to the new one (breaking this for other Pythons that have that opcode, but this to get going, and you just want to get and idea of what's involved.)

Let us know what you figure out. Depending and based on what you find out, if I have a suggestion as to what to do next maybe I or someone else will answer.

Or perhaps someone else will offer an idea.

Let me be kind of blunt: it takes a lot of work to write and understand code like this. I may have spent already more time writing this up than the amount of time and effort to ask the question. In my open source projects, except for those supporting or sponsoring the project, I would like to see the amount of effort spent by the people requesting help to be on par with the amount of time with the amount of time I spend.

@zrax
Copy link
Owner

zrax commented Feb 21, 2024

Duplicate #449

@zrax zrax closed this as completed Feb 21, 2024
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

5 participants