CensoredUsername / unrpyc

A ren'py script decompiler
Other
859 stars 156 forks source link

ModuleNotFoundError: No module named 'renpy' #225

Closed Ronzan closed 5 months ago

Ronzan commented 5 months ago

Hello,

I'm probably just missing something simple, but I cannot run unrpyc.py. I cloned the repo and updated Python 3 today. I do and get the following: image

Any clues?

Thanks

CensoredUsername commented 5 months ago

That's very curious. Thank you for the thorough report. Might be something with python 3.12. Can you test with 3.9/3.10 by any chance?

CensoredUsername commented 5 months ago

Edit: I can reproduce this on 3.12.3. Something's breaking in the import faking system likely.

CensoredUsername commented 5 months ago

Yep, MetaPathFinder.find_module backwards compat got removed, that was causing the error.

Implemented the new MetaPathFinder.find_spec and now everything works again. You can check it out on the dev branch.

I also added python 3.12 to the unit tests, so we don't get caught by such changes in the future.

Ronzan commented 5 months ago

Awesome, thanks @CensoredUsername ! I grabbed the dev branch and it is working on my system now.

Sorry I couldn't test it before now, I'm in a different time zone I guess :) Thank you for you work here and fast response, much appreciated.