-
Notifications
You must be signed in to change notification settings - Fork 157
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
AttributeError: 'RawBlock' object has no attribute 'statements' #197
Comments
Basically "RawBlock" can be without attrs(fix this and more will come) and we need now to check against it. Like in many other places in the last years. Edit: A little bit too fast... With the fix (dev_fix_ish197) it decompiles without error but the resulting .rpy is "strange". A lot of image statement blocks without content. |
Huh, I wonder what causes that. renpy should unconditionally assign I have a feeling more is afoot there. |
Try decompiling that single file with legacy ;) |
Damn.
|
No, only to decompile that single file. The rest was compiled with 8.1, go figure why. |
I'm afraid I don't actually have any older versions, nor do I see a way to get them off Itch.
Aha, wild. Not going to worry about this for now then! Thanks for looking into it :) |
Strange. I decompiled and astdumped everything error free with v1.3.0. Tested the game even a few minutes(fast skip) and encountered no issues. Very curious.
Ah no. I found a few more in there from different dates all the way back to 2022, but the most are as you said. 🤷🏻 More riddles... |
Seems for everything I ripped out of either, both legacy and master are still pretty decent at decompiling stuff from either py2 or py3 based renpy. Honestly pretty surprising. |
Just FYI, I'm fine with this being either closed or kept open for discussion. If possible, though, I'd request some check to ensure you're using the right version - I'm certain I won't be the last person to report something that ends up being "wrong renpy version", and a more descriptive error message would go a long way to stop that. This assumes there's a good way for code to tell which version the .rpyc is, though. . . . although, given the discussion here, maybe with an optional flag to try anyway. Or do the check only on error. |
I'm currently of the opinion that doing both is a good idea. I've added some detection, but the format makes it hard to detect all. That said, if we can't detect it, we might just be able to decompile it decently. The detection just prints a warning, and I'll add back a few pre ren'py 8 features (basically just ubiquitous parameter / argument handling). That will likely be enough to support basically every ren'py 7 game as well. Not sure how much more it'd be able to decently handle. 6.17 is the first I know it definitely won't as that requires old-style screenlang handling. Rest is some much more minor backwards compatibility hazards. |
See #199 |
This has all been implemented. |
Ran into an error when decompiling a free game. The full stacktrace:
If you'd like to reproduce it, grab https://hatchet-games.itch.io/maeves-academy and try decompiling the file
goth_wardrobe.rpyc
.I'm using v2.0.0. Worked fine on all the other files, so it's probably not my environment.
(Thanks for the Py3 update!)
The text was updated successfully, but these errors were encountered: