Ahi ahi ahi, the pickle module doesn't work

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
User avatar
gas
Miko-Class Veteran
Posts: 842
Joined: Mon Jan 26, 2009 7:21 pm
Contact:

Ahi ahi ahi, the pickle module doesn't work

#1 Post by gas »

It work for other projects I'm working with.
So probably depend on the structure.
It's so complex that I can't post examples.

Could be:

Code: Select all

label main_menu:
    return
being responsible?
If not, what else?

Code: Select all

I'm sorry, but an uncaught exception occurred.

While running game code:
  File "renpy/common/00keymap.rpy", line 396, in script
    python hide:
  File "renpy/common/00keymap.rpy", line 411, in <module>
    renpy.save("_reload-1", "reload save game")
PicklingError: Can't pickle <type 'module'>: attribute lookup __builtin__.module failed

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

Full traceback:
  File "renpy/common/00keymap.rpy", line 396, in script
    python hide:
  File "/home/valentina/Scrivania/renpy-6.99.12.2-sdk/renpy/ast.py", line 814, in execute
    renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
  File "/home/valentina/Scrivania/renpy-6.99.12.2-sdk/renpy/python.py", line 1719, in py_exec_bytecode
    exec bytecode in globals, locals
  File "renpy/common/00keymap.rpy", line 411, in <module>
    renpy.save("_reload-1", "reload save game")
  File "/home/valentina/Scrivania/renpy-6.99.12.2-sdk/renpy/loadsave.py", line 286, in save
    dump((roots, renpy.game.log), logf)
  File "/home/valentina/Scrivania/renpy-6.99.12.2-sdk/renpy/loadsave.py", line 45, in dump
    cPickle.dump(o, f, cPickle.HIGHEST_PROTOCOL)
PicklingError: Can't pickle <type 'module'>: attribute lookup __builtin__.module failed

Linux-3.19.0-32-generic-i686-with-debian-jessie-sid
Ren'Py 6.99.12.4.2187
DaDaDa0.3 1.0
If you want to debate on a reply I gave to your posts, please QUOTE ME or i'll not be notified about. << now red so probably you'll see it.

10 ? "RENPY"
20 GOTO 10

RUN

User avatar
PyTom
Ren'Py Creator
Posts: 16093
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Ahi ahi ahi, the pickle module doesn't work

#2 Post by PyTom »

It's most likely the code:

Code: Select all

python:
    import mymodule
Since imports can only happen in init python.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

User avatar
gas
Miko-Class Veteran
Posts: 842
Joined: Mon Jan 26, 2009 7:21 pm
Contact:

Re: Ahi ahi ahi, the pickle module doesn't work

#3 Post by gas »

...I'll never forget 'init' again, I'll swear.

Thank you.
If you want to debate on a reply I gave to your posts, please QUOTE ME or i'll not be notified about. << now red so probably you'll see it.

10 ? "RENPY"
20 GOTO 10

RUN

Post Reply

Who is online

Users browsing this forum: Bing [Bot]