Cannot save the game!

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
kyj4995
Newbie
Posts: 2
Joined: Mon Nov 12, 2018 3:31 am
Contact:

Cannot save the game!

#1 Post by kyj4995 »

I am having trouble with save feature of RenPy. I have no idea what is causing the game to crash when i hit save.

I tried to look up for errors in code but failed.

Code: Select all

I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/script.rpy", line 129, in script
    e "Hiiiiiiiiiiiiiiiiii"
  File "renpy/common/00action_file.rpy", line 372, in __call__
    renpy.save(fn, extra_info=save_name)
PicklingError: Can't pickle <type 'function'>: attribute lookup __builtin__.function failed

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

Full traceback:
  File "game/script.rpy", line 129, in script
    e "Hiiiiiiiiiiiiiiiiii"
  File "C:\Users\USERNAME\RenPy\renpy-7.1.1-sdk\renpy\ast.py", line 678, in execute
    renpy.exports.say(who, what, interact=self.interact, *args, **kwargs)
  File "C:\Users\USERNAME\RenPy\renpy-7.1.1-sdk\renpy\exports.py", line 1204, in say
    who(what, *args, **kwargs)
  File "C:\Users\USERNAME\RenPy\renpy-7.1.1-sdk\renpy\character.py", line 1031, in __call__
    self.do_display(who, what, cb_args=self.cb_args, **display_args)
  File "C:\Users\USERNAME\RenPy\renpy-7.1.1-sdk\renpy\character.py", line 823, in do_display
    **display_args)
  File "C:\Users\USERNAME\RenPy\renpy-7.1.1-sdk\renpy\character.py", line 572, in display_say
    rv = renpy.ui.interact(mouse='say', type=type, roll_forward=roll_forward)
  File "C:\Users\USERNAME\RenPy\renpy-7.1.1-sdk\renpy\ui.py", line 289, in interact
    rv = renpy.game.interface.interact(roll_forward=roll_forward, **kwargs)
  File "C:\Users\USERNAME\RenPy\renpy-7.1.1-sdk\renpy\display\core.py", line 2662, in interact
    repeat, rv = self.interact_core(preloads=preloads, trans_pause=trans_pause, **kwargs)
  File "C:\Users\USERNAME\RenPy\renpy-7.1.1-sdk\renpy\display\core.py", line 3467, in interact_core
    rv = root_widget.event(ev, x, y, 0)
  File "C:\Users\USERNAME\RenPy\renpy-7.1.1-sdk\renpy\display\layout.py", line 995, in event
    rv = i.event(ev, x - xo, y - yo, cst)
  File "C:\Users\USERNAME\RenPy\renpy-7.1.1-sdk\renpy\display\layout.py", line 995, in event
    rv = i.event(ev, x - xo, y - yo, cst)
  File "C:\Users\USERNAME\RenPy\renpy-7.1.1-sdk\renpy\display\layout.py", line 995, in event
    rv = i.event(ev, x - xo, y - yo, cst)
  File "C:\Users\USERNAME\RenPy\renpy-7.1.1-sdk\renpy\display\screen.py", line 697, in event
    rv = self.child.event(ev, x, y, st)
  File "C:\Users\USERNAME\RenPy\renpy-7.1.1-sdk\renpy\display\layout.py", line 995, in event
    rv = i.event(ev, x - xo, y - yo, cst)
  File "C:\Users\USERNAME\RenPy\renpy-7.1.1-sdk\renpy\display\layout.py", line 995, in event
    rv = i.event(ev, x - xo, y - yo, cst)
  File "C:\Users\USERNAME\RenPy\renpy-7.1.1-sdk\renpy\display\behavior.py", line 907, in event
    return handle_click(self.clicked)
  File "C:\Users\USERNAME\RenPy\renpy-7.1.1-sdk\renpy\display\behavior.py", line 842, in handle_click
    rv = run(action)
  File "C:\Users\USERNAME\RenPy\renpy-7.1.1-sdk\renpy\display\behavior.py", line 308, in run
    new_rv = run(i, *args, **kwargs)
  File "C:\Users\USERNAME\RenPy\renpy-7.1.1-sdk\renpy\display\behavior.py", line 315, in run
    return action(*args, **kwargs)
  File "renpy/common/00action_file.rpy", line 372, in __call__
    renpy.save(fn, extra_info=save_name)
  File "C:\Users\USERNAME\RenPy\renpy-7.1.1-sdk\renpy\loadsave.py", line 404, in save
    dump((roots, renpy.game.log), logf)
  File "C:\Users\USERNAME\RenPy\renpy-7.1.1-sdk\renpy\loadsave.py", line 48, in dump
    cPickle.dump(o, f, cPickle.HIGHEST_PROTOCOL)
PicklingError: Can't pickle <type 'function'>: attribute lookup __builtin__.function failed

Windows-8-6.2.9200
Ren'Py 7.1.1.929
The game 0.1
Mon Nov 12 16:28:42 2018
I know I'm just posting a log and begging for help without digging in deeper, but this is the best i could

User avatar
Remix
Eileen-Class Veteran
Posts: 1628
Joined: Tue May 30, 2017 6:10 am
Completed: None... yet (as I'm still looking for an artist)
Projects: An un-named anime based trainer game
Contact:

Re: Cannot save the game!

#2 Post by Remix »

Firstly, try:

Code: Select all

init python:
    config.use_cpickle = False

    ## TODO: Remove this before releasing the game
See if the traceback is any more useful and whether it points at the offending function more directly...
Frameworks & Scriptlets:

kyj4995
Newbie
Posts: 2
Joined: Mon Nov 12, 2018 3:31 am
Contact:

Re: Cannot save the game!

#3 Post by kyj4995 »

Thanks. The urllib3 caused the issue. Save feature couldn't understand definition "http = urllib3.PoolManager()", so i removed it.

Post Reply

Who is online

Users browsing this forum: Google [Bot]