Tested on RenPy 6.16.5, 6.15.7 and even 6.1.0c.
Here is the minimal test case:
Code: Select all
label start:
"You can Save here."
$ some_check = lambda: None
"You cannot Save here."
Code: Select all
I'm sorry, but an uncaught exception occurred.
While running game code:
File "renpy/common/_layout/screen_load_save.rpym", line 17, in script
File "renpy/common/00action_file.rpy", line 241, in python
PicklingError: Can't pickle <type 'function'>: attribute lookup __builtin__.function failed
-- Full Traceback ------------------------------------------------------------
Full traceback:
File "C:\renpy\renpy\execution.py", line 288, in run
node.execute()
File "C:\renpy\renpy\ast.py", line 720, in execute
renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
File "C:\renpy\renpy\python.py", line 1308, in py_exec_bytecode
exec bytecode in globals, locals
File "renpy/common/_layout/screen_load_save.rpym", line 17, in <module>
$ ui.interact()
File "C:\renpy\renpy\ui.py", line 237, in interact
rv = renpy.game.interface.interact(roll_forward=roll_forward, **kwargs)
File "C:\renpy\renpy\display\core.py", line 1853, in interact
repeat, rv = self.interact_core(preloads=preloads, **kwargs)
File "C:\renpy\renpy\display\core.py", line 2406, in interact_core
rv = root_widget.event(ev, x, y, 0)
File "C:\renpy\renpy\display\layout.py", line 749, in event
rv = i.event(ev, x - xo, y - yo, cst)
File "C:\renpy\renpy\display\layout.py", line 749, in event
rv = i.event(ev, x - xo, y - yo, cst)
File "C:\renpy\renpy\display\layout.py", line 749, in event
rv = i.event(ev, x - xo, y - yo, cst)
File "C:\renpy\renpy\display\screen.py", line 319, in event
rv = self.child.event(ev, x, y, st)
File "C:\renpy\renpy\display\layout.py", line 749, in event
rv = i.event(ev, x - xo, y - yo, cst)
File "C:\renpy\renpy\display\layout.py", line 175, in event
rv = d.event(ev, x - xo, y - yo, st)
File "C:\renpy\renpy\display\layout.py", line 749, in event
rv = i.event(ev, x - xo, y - yo, cst)
File "C:\renpy\renpy\display\layout.py", line 175, in event
rv = d.event(ev, x - xo, y - yo, st)
File "C:\renpy\renpy\display\behavior.py", line 636, in event
rv = run(self.clicked)
File "C:\renpy\renpy\display\behavior.py", line 222, in run
return var(*args, **kwargs)
File "renpy/common/00action_file.rpy", line 241, in __call__
renpy.save(fn, extra_info=save_name)
File "C:\renpy\renpy\loadsave.py", line 272, in save
dump((roots, renpy.game.log), logf)
File "C:\renpy\renpy\loadsave.py", line 43, in dump
cPickle.dump(o, f, cPickle.HIGHEST_PROTOCOL)
PicklingError: Can't pickle <type 'function'>: attribute lookup __builtin__.function failed
Windows-post2008Server-6.2.9200
Ren'Py 6.16.5.525
test 0.0