[SOLVED]Unintentional import of pygame_sdl2.mixer

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
cvrunmin
Newbie
Posts: 1
Joined: Wed Dec 26, 2018 2:10 am
Github: cvrunmin
Contact:

[SOLVED]Unintentional import of pygame_sdl2.mixer

#1 Post by cvrunmin »

Somehow when I tries to save my game, the game crashes becuase it's trying to search "pygame_sdl2.mixer", which is not included in ren'py.

full traceback.txt:

Code: Select all

I'm sorry, but an uncaught exception occurred.

While running game code:
  File "renpy/common/00action_file.rpy", line 372, in __call__
    renpy.save(fn, extra_info=save_name)
NotImplementedError: Could not import pygame_sdl2.mixer: No module named mixer

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

Full traceback:
  File "renpy/common/_layout/screen_load_save.rpym", line 35, in script
    $ ui.interact()
  File "C:\Users\WhoAmI\Documents\Lung_File\renpy-7.1.3-sdk\renpy\ast.py", line 881, in execute
    renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
  File "C:\Users\WhoAmI\Documents\Lung_File\renpy-7.1.3-sdk\renpy\python.py", line 1913, in py_exec_bytecode
    exec bytecode in globals, locals
  File "renpy/common/_layout/screen_load_save.rpym", line 35, in <module>
    $ ui.interact()
  File "C:\Users\WhoAmI\Documents\Lung_File\renpy-7.1.3-sdk\renpy\ui.py", line 289, in interact
    rv = renpy.game.interface.interact(roll_forward=roll_forward, **kwargs)
  File "C:\Users\WhoAmI\Documents\Lung_File\renpy-7.1.3-sdk\renpy\display\core.py", line 2672, in interact
    repeat, rv = self.interact_core(preloads=preloads, trans_pause=trans_pause, **kwargs)
  File "C:\Users\WhoAmI\Documents\Lung_File\renpy-7.1.3-sdk\renpy\display\core.py", line 3477, in interact_core
    rv = root_widget.event(ev, x, y, 0)
  File "C:\Users\WhoAmI\Documents\Lung_File\renpy-7.1.3-sdk\renpy\display\layout.py", line 998, in event
    rv = i.event(ev, x - xo, y - yo, cst)
  File "C:\Users\WhoAmI\Documents\Lung_File\renpy-7.1.3-sdk\renpy\display\transition.py", line 47, in event
    return self.new_widget.event(ev, x, y, st)  # E1101
  File "C:\Users\WhoAmI\Documents\Lung_File\renpy-7.1.3-sdk\renpy\display\layout.py", line 998, in event
    rv = i.event(ev, x - xo, y - yo, cst)
  File "C:\Users\WhoAmI\Documents\Lung_File\renpy-7.1.3-sdk\renpy\display\layout.py", line 998, in event
    rv = i.event(ev, x - xo, y - yo, cst)
  File "C:\Users\WhoAmI\Documents\Lung_File\renpy-7.1.3-sdk\renpy\display\screen.py", line 697, in event
    rv = self.child.event(ev, x, y, st)
  File "C:\Users\WhoAmI\Documents\Lung_File\renpy-7.1.3-sdk\renpy\display\layout.py", line 998, in event
    rv = i.event(ev, x - xo, y - yo, cst)
  File "C:\Users\WhoAmI\Documents\Lung_File\renpy-7.1.3-sdk\renpy\display\layout.py", line 244, in event
    rv = d.event(ev, x - xo, y - yo, st)
  File "C:\Users\WhoAmI\Documents\Lung_File\renpy-7.1.3-sdk\renpy\display\layout.py", line 998, in event
    rv = i.event(ev, x - xo, y - yo, cst)
  File "C:\Users\WhoAmI\Documents\Lung_File\renpy-7.1.3-sdk\renpy\display\layout.py", line 998, in event
    rv = i.event(ev, x - xo, y - yo, cst)
  File "C:\Users\WhoAmI\Documents\Lung_File\renpy-7.1.3-sdk\renpy\display\behavior.py", line 910, in event
    return handle_click(self.clicked)
  File "C:\Users\WhoAmI\Documents\Lung_File\renpy-7.1.3-sdk\renpy\display\behavior.py", line 845, in handle_click
    rv = run(action)
  File "C:\Users\WhoAmI\Documents\Lung_File\renpy-7.1.3-sdk\renpy\display\behavior.py", line 308, in run
    new_rv = run(i, *args, **kwargs)
  File "C:\Users\WhoAmI\Documents\Lung_File\renpy-7.1.3-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\WhoAmI\Documents\Lung_File\renpy-7.1.3-sdk\renpy\loadsave.py", line 404, in save
    dump((roots, renpy.game.log), logf)
  File "C:\Users\WhoAmI\Documents\Lung_File\renpy-7.1.3-sdk\renpy\loadsave.py", line 50, in dump
    pickle.dump(o, f, pickle.HIGHEST_PROTOCOL)
  File "/home/tom/ab/x64lucid-deps/install/lib/python2.7/pickle.py", line 1370, in dump
  File "/home/tom/ab/x64lucid-deps/install/lib/python2.7/pickle.py", line 224, in dump
  File "/home/tom/ab/x64lucid-deps/install/lib/python2.7/pickle.py", line 286, in save
  File "/home/tom/ab/x64lucid-deps/install/lib/python2.7/pickle.py", line 548, in save_tuple
  File "/home/tom/ab/x64lucid-deps/install/lib/python2.7/pickle.py", line 286, in save
  File "/home/tom/ab/x64lucid-deps/install/lib/python2.7/pickle.py", line 649, in save_dict
  File "/home/tom/ab/x64lucid-deps/install/lib/python2.7/pickle.py", line 681, in _batch_setitems
  File "/home/tom/ab/x64lucid-deps/install/lib/python2.7/pickle.py", line 331, in save
  File "/home/tom/ab/x64lucid-deps/install/lib/python2.7/pickle.py", line 419, in save_reduce
  File "/home/tom/ab/x64lucid-deps/install/lib/python2.7/pickle.py", line 286, in save
  File "/home/tom/ab/x64lucid-deps/install/lib/python2.7/pickle.py", line 649, in save_dict
  File "/home/tom/ab/x64lucid-deps/install/lib/python2.7/pickle.py", line 681, in _batch_setitems
  File "/home/tom/ab/x64lucid-deps/install/lib/python2.7/pickle.py", line 331, in save
  File "/home/tom/ab/x64lucid-deps/install/lib/python2.7/pickle.py", line 416, in save_reduce
  File "/home/tom/ab/x64lucid-deps/install/lib/python2.7/pickle.py", line 681, in _batch_setitems
  File "/home/tom/ab/x64lucid-deps/install/lib/python2.7/pickle.py", line 331, in save
  File "/home/tom/ab/x64lucid-deps/install/lib/python2.7/pickle.py", line 419, in save_reduce
  File "/home/tom/ab/x64lucid-deps/install/lib/python2.7/pickle.py", line 286, in save
  File "/home/tom/ab/x64lucid-deps/install/lib/python2.7/pickle.py", line 649, in save_dict
  File "/home/tom/ab/x64lucid-deps/install/lib/python2.7/pickle.py", line 681, in _batch_setitems
  File "/home/tom/ab/x64lucid-deps/install/lib/python2.7/pickle.py", line 286, in save
  File "/home/tom/ab/x64lucid-deps/install/lib/python2.7/pickle.py", line 725, in save_inst
  File "/home/tom/ab/x64lucid-deps/install/lib/python2.7/pickle.py", line 286, in save
  File "/home/tom/ab/x64lucid-deps/install/lib/python2.7/pickle.py", line 649, in save_dict
  File "/home/tom/ab/x64lucid-deps/install/lib/python2.7/pickle.py", line 681, in _batch_setitems
  File "/home/tom/ab/x64lucid-deps/install/lib/python2.7/pickle.py", line 331, in save
  File "/home/tom/ab/x64lucid-deps/install/lib/python2.7/pickle.py", line 419, in save_reduce
  File "/home/tom/ab/x64lucid-deps/install/lib/python2.7/pickle.py", line 286, in save
  File "/home/tom/ab/x64lucid-deps/install/lib/python2.7/pickle.py", line 649, in save_dict
  File "/home/tom/ab/x64lucid-deps/install/lib/python2.7/pickle.py", line 681, in _batch_setitems
  File "/home/tom/ab/x64lucid-deps/install/lib/python2.7/pickle.py", line 286, in save
  File "/home/tom/ab/x64lucid-deps/install/lib/python2.7/pickle.py", line 739, in save_global
  File "/home/tom/ab/x64lucid-deps/install/lib/python2.7/pickle.py", line 817, in whichmodule
  File "c:\mingw\msys\1.0\newbuild\install\python\pygame_sdl2\__init__.py", line 33, in __getattr__
NotImplementedError: Could not import pygame_sdl2.mixer: No module named mixer

Windows-8-6.2.9200
Ren'Py 7.1.3.1092
Monsterization 1.0
Wed Dec 26 14:22:03 2018
Whole source code has been uploaded here: https://github.com/cvrunmin/Monsterization
When the game script runs at game/rpgmap.rpy Line 154, this problem occurs.

Note: mypickle.py, 00myloadsave.rpy and 01myactiontmp.rpy are almost identicial to pickle.py(from Python 2.7.3), loadsave.py, 00action_file.rpy except that mypickle.py print something to the console and others try to redirect the saving process to mypickle

EDIT: The devil inside of it is the Queue.Queue used at 00overworld.rpy. Replacing with collections.deque helps. Reference:https://stackoverflow.com/questions/167 ... -in-python

Post Reply

Who is online

Users browsing this forum: Google [Bot], RandomHuman64