Ren'Py Tried porting Dear Monster, but came across an error for the save/load function

ZelvanInRow

Active Member
Sep 19, 2019
518
521
Here is the error code:
```
I'm sorry, but an uncaught exception occurred.

While running game code:
File "renpy/common/00gamemenu.rpy", line 170, in script
$ ui.interact()
File "renpy/common/00gamemenu.rpy", line 170, in <module>
$ ui.interact()
File "renpy/common/00action_file.rpy", line 383, in __call__
renpy.save(fn, extra_info=save_name)
Exception: Could not pickle <module 'renpy.display.anim' from 'D:\\Game engine\\renpy\\renpy-7.4.11-sdk\\renpy\\display\\anim.py'>. (perhaps renpy.game.log.log[0].stores['store']['anim'] = <module 'renpy.display.anim' from 'D:\\Game engine\\renpy\\renpy-7.4.11-sdk\\renpy\\display\\anim.py'>)

-- Full Traceback ------------------------------------------------------------

Full traceback:
File "renpy/common/00gamemenu.rpy", line 170, in script
$ ui.interact()
File "D:\Game engine\renpy\renpy-7.4.11-sdk\renpy\ast.py", line 1131, in execute
renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
File "D:\Game engine\renpy\renpy-7.4.11-sdk\renpy\python.py", line 1061, in py_exec_bytecode
exec(bytecode, globals, locals)
File "renpy/common/00gamemenu.rpy", line 170, in <module>
$ ui.interact()
File "D:\Game engine\renpy\renpy-7.4.11-sdk\renpy\ui.py", line 299, in interact
rv = renpy.game.interface.interact(roll_forward=roll_forward, **kwargs)
File "D:\Game engine\renpy\renpy-7.4.11-sdk\renpy\display\core.py", line 3377, in interact
repeat, rv = self.interact_core(preloads=preloads, trans_pause=trans_pause, pause=pause, pause_start=pause_start, pause_modal=pause_modal, **kwargs) # type: ignore
File "D:\Game engine\renpy\renpy-7.4.11-sdk\renpy\display\core.py", line 4258, in interact_core
rv = root_widget.event(ev, x, y, 0)
File "D:\Game engine\renpy\renpy-7.4.11-sdk\renpy\display\layout.py", line 1175, in event
rv = i.event(ev, x - xo, y - yo, cst)
File "D:\Game engine\renpy\renpy-7.4.11-sdk\renpy\display\transition.py", line 53, in event
return self.new_widget.event(ev, x, y, st) # E1101
File "D:\Game engine\renpy\renpy-7.4.11-sdk\renpy\display\layout.py", line 1175, in event
rv = i.event(ev, x - xo, y - yo, cst)
File "D:\Game engine\renpy\renpy-7.4.11-sdk\renpy\display\layout.py", line 1175, in event
rv = i.event(ev, x - xo, y - yo, cst)
File "D:\Game engine\renpy\renpy-7.4.11-sdk\renpy\display\screen.py", line 743, in event
rv = self.child.event(ev, x, y, st)
File "D:\Game engine\renpy\renpy-7.4.11-sdk\renpy\display\layout.py", line 1175, in event
rv = i.event(ev, x - xo, y - yo, cst)
File "D:\Game engine\renpy\renpy-7.4.11-sdk\renpy\display\layout.py", line 1175, in event
rv = i.event(ev, x - xo, y - yo, cst)
File "D:\Game engine\renpy\renpy-7.4.11-sdk\renpy\display\layout.py", line 1175, in event
rv = i.event(ev, x - xo, y - yo, cst)
File "D:\Game engine\renpy\renpy-7.4.11-sdk\renpy\display\behavior.py", line 1073, in event
return handle_click(self.clicked)
File "D:\Game engine\renpy\renpy-7.4.11-sdk\renpy\display\behavior.py", line 1008, in handle_click
rv = run(action)
File "D:\Game engine\renpy\renpy-7.4.11-sdk\renpy\display\behavior.py", line 329, in run
return action(*args, **kwargs)
File "renpy/common/00action_file.rpy", line 383, in __call__
renpy.save(fn, extra_info=save_name)
File "D:\Game engine\renpy\renpy-7.4.11-sdk\renpy\loadsave.py", line 408, in save
reraise(t, e, tb)
File "/home/tom/ab/renpy-build/tmp/install.linux-x86_64/lib/python3.9/site-packages/future/utils/__init__.py", line 441, in raise_
File "D:\Game engine\renpy\renpy-7.4.11-sdk\renpy\loadsave.py", line 389, in save
dump((roots, renpy.game.log), logf)
File "D:\Game engine\renpy\renpy-7.4.11-sdk\renpy\compat\pickle.py", line 103, in dump
pickle.dump(o, f, pickle.HIGHEST_PROTOCOL if highest else PROTOCOL)
File "D:\Game engine\renpy\renpy-7.4.11-sdk\renpy\python.py", line 1158, in module_pickle
raise Exception("Could not pickle {!r}.".format(module))
Exception: Could not pickle <module 'renpy.display.anim' from 'D:\\Game engine\\renpy\\renpy-7.4.11-sdk\\renpy\\display\\anim.py'>. (perhaps renpy.game.log.log[0].stores['store']['anim'] = <module 'renpy.display.anim' from 'D:\\Game engine\\renpy\\renpy-7.4.11-sdk\\renpy\\display\\anim.py'>)

Windows-10-10.0.19044 AMD64
Ren'Py 8.0.3.22090809
Dear Monster 1.02
Fri Jan 20 05:06:41 2023
```
Honestly, this is my first time trying to port a game with animation so I am all over the place and don't exactly know what to do.
Anyone can help me?
Thank you.
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Respected User
Donor
Jun 10, 2017
10,292
15,151
Anyone can help me?
You did more than porting (from what to what ?) the game, you also changed its code. This turned the "anim" variable as savable, while it can't be saved.
 

ZelvanInRow

Active Member
Sep 19, 2019
518
521
You did more than porting (from what to what ?) the game, you also changed its code. This turned the "anim" variable as savable, while it can't be saved.
But I didn't change anything aside from deleting the default mobile setting in screen and gui.rpy
Oh by the way I did some testing with new game files that haven't been messed around with.
When played without the rpa file being extracted work perfectly but the moment the RPA file was extracted, the error happen.

Tried some more testing and turns out these were the cause of the error
1674243419795.png
I don't know why they caused it though, but its fixed when I removed them all.
 
Last edited: