CensoredUsername / unrpyc

A ren'py script decompiler
Other
824 stars 149 forks source link

Renpy 8 and 7.5 compat fix #161

Closed madeddy closed 4 months ago

madeddy commented 1 year ago

This pull req fixes all known bugs(state 22.May'23) within Renpy 8 and 7.5 branches due to code changes there. RenPy 8 however needs also the py3 port for unrpyc(#159)!

Considering the above line this should effectively close the issues #146, #147, #149, #152, #156.


A complete branch for RenPy 8, which already includes the Py3 port, is available here: https://github.com/madeddy/unrpyc/tree/py3_v1.1.8 For RenPy 7.5 should this branch work "as it is".

GiovanH commented 1 year ago

Can confirm that this correctly fixes errors introduced in new ren'py versions.

cky0026 commented 11 months ago

This pull req fixes all known bugs(state 22.May'23) within Renpy 8 and 7.5 branches due to code changes there. RenPy 8 however needs also the py3 port for unrpyc(#159)!

Considering the above line this should effectively close the issues #146, #147, #149, #152, #156.

A complete branch for RenPy 8, which already includes the Py3 port, is available here: https://github.com/madeddy/unrpyc/tree/py3_v1.1.8 For RenPy 7.5 should this branch work "as it is".

thank you so much!! this py works perfectly for me!! problem solved👍

CensoredUsername commented 4 months ago

Heya, I've folded a few of these issues into dev right now, some notes on what I did take and didn't take:

I've also already added changes to parameter parsing as well, ren'py changed that significantly so it was a likely next crash for many other items. That said, I don't have test cases for that yet. I'll close this one for now, but I'm curious what the change in magic.py was needed for.

madeddy commented 4 months ago

Possible footgun for isinstance checking on those... 🤣

Indeed. That's why the revertable switch seemed practical at this time. We will see. 🤷🏻‍♂️

...but I'm curious what the change in magic.py was needed for.

I should have added a longer explanation. As far as i remember the vars there can now be empty instead with a value or None type. Without the change this errors then in v7.5+(?) and v8.

Your can see here the old variant of the fix which is a bit more self explaining i think.

Edit: Oh and here: Initial post, first error: #146

Traceback (most recent call last):
  File "<unrpyc>", line 40, in decompile_game
  File "<unrpyc>", line 32, in decompile_rpyc
  File "<unrpyc>", line 27, in read_ast_from_file
  File "<magic>", line 143, in safe_loads
  File "/home/tom/ab/renpy-build/tmp/install.linux-x86_64/lib/python2.7/pickle.py", line 864, in load
  File "/home/tom/ab/renpy-build/tmp/install.linux-x86_64/lib/python2.7/pickle.py", line 1139, in load_reduce
  File "<magic>", line 24, in __new__
FakeUnpicklingError: <class 'set'> was instantiated with unexpected arguments ([],), {}