Closed Question2 closed 10 years ago
I tried decompiling script.rpy from script.rpyc, didnt edit the .rpy file at all, and got this error:
I'm sorry, but an uncaught exception occurred.
While running game code: File "game/script.rpy", line 30, in script File "game/script.rpy", line 30, in python NameError: name 'TODO' is not defined
-- Full Traceback ------------------------------------------------------------
Full traceback:
File "D:\DemonMasterChris\renpy\execution.py", line 288, in run
node.execute()
File "D:\DemonMasterChris\renpy\ast.py", line 1372, in execute
target = renpy.python.py_eval(target)
File "D:\DemonMasterChris\renpy\python.py", line 1331, in py_eval
return eval(py_compile(source, 'eval'), globals, locals)
File "game/script.rpy", line 30, in
Windows-7-6.1.7601-SP1 Ren'Py 6.15.7.374 DMC 1.10
Looks like some piece of AST that's unsupported by the decompiler. If you know Python you could implement support and send a pull request.
I have no idea how to do that o.O
I can take a look at it, and I have an idea what causes the second error, but diagnosing the first error is going to be hard without the original .rpyc file. Could you maybe send it to me?
Okay, found a fix for the second error, still investigating the first. Looks like it's related to passing parameters when calling labels with keyword arguments.
I think I've found the problem, but I'm not sure because I don't have a test case. I upgraded the print_param and print_args functions to support everything renpy actually has to offer from calls to labels (see PEP 3102). This should fix the problem. Need to test it a bit more though, so for now check if https://github.com/CensoredUsername/unrpyc fixes the problem.
Sorry for the late reply, do you still need the .rpyc file? I will test the fix, thanks.
If the fix works, I don't need it, if the fix doesn't work, I probably need it to figure out what the hell is going wrong.
Seems to be working fine, thanks!
Ok then, pushing the fixes to this repo too then and closing.
Hi,
I am attempting to decompile .rpyc files for a game called "Demon Master Chris". The game runs fine until i decompile battle.rpy from battle.rpyc, at which point it will get an error when entering combat.
Error message :
I'm sorry, but an uncaught exception occurred.
While running game code: File "game/dungeon.rpy", line 20, in script call File "game/dungeon.rpy", line 20, in script call File "game/dungeon.rpy", line 103, in script call File "game/dungeon.rpy", line 20, in script call File "game/dungeon.rpy", line 103, in script call File "game/battle.rpy", line 17, in script call File "game/battle.rpy", line 22, in script Exception: Required parameter talk has no value.
-- Full Traceback ------------------------------------------------------------
Full traceback: File "D:\DemonMasterChris\renpy\execution.py", line 288, in run node.execute() File "D:\DemonMasterChris\renpy\ast.py", line 666, in execute values = apply_arguments(self.parameters, renpy.store._args, renpy.store._kwargs) File "D:\DemonMasterChris\renpy\ast.py", line 593, in apply_arguments raise Exception("Required parameter %s has no value." % name) Exception: Required parameter talk has no value.
Windows-7-6.1.7601-SP1 Ren'Py 6.15.7.374 DMC 1.10
I did not edit battle.rpy at all and this was the only file i decompiled (not sure why its mentioning dungeon.rpy). But seeing as how the error shows up only after i decompile battle.rpy form battle.rpyc, and i did nothing else, im thinking the decompier is messing up somehow....
Log of decompiling
D:\DemonMasterChris>unrpyc.py --clobber "game\battle.rpyc" D:\DemonMasterChris\renpy\ast.py:33: DeprecationWarning: the md5 module is depre cated; use hashlib instead import md5 D:\DemonMasterChris\renpy\python.py:33: DeprecationWarning: the sets module is d eprecated import sets Decompiling game\battle.rpyc to game\battle.rpy... Decompilation of 1 script file successful