找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 450|回复: 1

[已解决] 存档时出现报错如何解决

[复制链接]
发表于 2024-9-30 17:13:28 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?立即注册

×
本帖最后由 Kasanerui 于 2024-10-2 18:00 编辑

求助大佬,如题,在运行程序的时候发现之前的存档全部消失了,试图存档报错:

[RenPy] 纯文本查看 复制代码
I'm sorry, but an uncaught exception occurred.

While running game code:
  File "renpy/common/00gamemenu.rpy", line 174, in script
    $ ui.interact()
  File "renpy/common/00gamemenu.rpy", line 174, in <module>
    $ ui.interact()
  File "renpy/common/00action_file.rpy", line 414, in __call__
    renpy.save(fn, extra_info=save_name)
Exception: Could not pickle <module 'pygame_sdl2' from 'E:\\renpy\\renpy-8.2.1-sdk\\lib\\python3.9\\pygame_sdl2\\__init__.pyc'>. (perhaps store.pygame = <module 'pygame_sdl2' from 'E:\\renpy\\renpy-8.2.1-sdk\\lib\\python3.9\\pygame_sdl2\\__init__.pyc'>)

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

Full traceback:
  File "renpy/common/00gamemenu.rpy", line 174, in script
    $ ui.interact()
  File "E:\renpy\renpy-8.2.1-sdk\renpy\ast.py", line 823, in execute
    renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
  File "E:\renpy\renpy-8.2.1-sdk\renpy\python.py", line 1178, in py_exec_bytecode
    exec(bytecode, globals, locals)
  File "renpy/common/00gamemenu.rpy", line 174, in <module>
    $ ui.interact()
  File "E:\renpy\renpy-8.2.1-sdk\renpy\ui.py", line 301, in interact
    rv = renpy.game.interface.interact(roll_forward=roll_forward, **kwargs)
  File "E:\renpy\renpy-8.2.1-sdk\renpy\display\core.py", line 2165, 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 "E:\renpy\renpy-8.2.1-sdk\renpy\display\core.py", line 3201, in interact_core
    rv = root_widget.event(ev, x, y, 0)
  File "E:\renpy\renpy-8.2.1-sdk\renpy\display\layout.py", line 1202, in event
    rv = i.event(ev, x - xo, y - yo, cst)
  File "E:\renpy\renpy-8.2.1-sdk\renpy\display\layout.py", line 1202, in event
    rv = i.event(ev, x - xo, y - yo, cst)
  File "E:\renpy\renpy-8.2.1-sdk\renpy\display\layout.py", line 1202, in event
    rv = i.event(ev, x - xo, y - yo, cst)
  File "E:\renpy\renpy-8.2.1-sdk\renpy\display\screen.py", line 793, in event
    rv = self.child.event(ev, x, y, st)
  File "E:\renpy\renpy-8.2.1-sdk\renpy\display\layout.py", line 1202, in event
    rv = i.event(ev, x - xo, y - yo, cst)
  File "E:\renpy\renpy-8.2.1-sdk\renpy\display\layout.py", line 1426, in event
    rv = super(Window, self).event(ev, x, y, st)
  File "E:\renpy\renpy-8.2.1-sdk\renpy\display\layout.py", line 288, in event
    rv = d.event(ev, x - xo, y - yo, st)
  File "E:\renpy\renpy-8.2.1-sdk\renpy\display\layout.py", line 1202, in event
    rv = i.event(ev, x - xo, y - yo, cst)
  File "E:\renpy\renpy-8.2.1-sdk\renpy\display\layout.py", line 1426, in event
    rv = super(Window, self).event(ev, x, y, st)
  File "E:\renpy\renpy-8.2.1-sdk\renpy\display\layout.py", line 288, in event
    rv = d.event(ev, x - xo, y - yo, st)
  File "E:\renpy\renpy-8.2.1-sdk\renpy\display\layout.py", line 1202, in event
    rv = i.event(ev, x - xo, y - yo, cst)
  File "E:\renpy\renpy-8.2.1-sdk\renpy\display\layout.py", line 288, in event
    rv = d.event(ev, x - xo, y - yo, st)
  File "E:\renpy\renpy-8.2.1-sdk\renpy\display\behavior.py", line 1174, in event
    return handle_click(self.clicked)
  File "E:\renpy\renpy-8.2.1-sdk\renpy\display\behavior.py", line 1095, in handle_click
    rv = run(action)
  File "E:\renpy\renpy-8.2.1-sdk\renpy\display\behavior.py", line 395, in run
    return action(*args, **kwargs)
  File "renpy/common/00action_file.rpy", line 414, in __call__
    renpy.save(fn, extra_info=save_name)
  File "E:\renpy\renpy-8.2.1-sdk\renpy\loadsave.py", line 436, in save
    reraise(t, e, tb)
  File "lib/python3.9/future/utils/__init__.py", line 444, in raise_
  File "E:\renpy\renpy-8.2.1-sdk\renpy\loadsave.py", line 417, in save
    dump((roots, renpy.game.log), logf)
  File "E:\renpy\renpy-8.2.1-sdk\renpy\compat\pickle.py", line 103, in dump
    pickle.dump(o, f, pickle.HIGHEST_PROTOCOL if highest else PROTOCOL)
  File "E:\renpy\renpy-8.2.1-sdk\renpy\python.py", line 1275, in module_pickle
    raise Exception("Could not pickle {!r}.".format(module))
Exception: Could not pickle <module 'pygame_sdl2' from 'E:\\renpy\\renpy-8.2.1-sdk\\lib\\python3.9\\pygame_sdl2\\__init__.pyc'>. (perhaps store.pygame = <module 'pygame_sdl2' from 'E:\\renpy\\renpy-8.2.1-sdk\\lib\\python3.9\\pygame_sdl2\\__init__.pyc'>)

Windows-10-10.0.22621 AMD64
Ren'Py 8.2.1.24030407
Aquarium 1.0
Mon Sep 30 17:09:42 2024



求问是哪出了问题,以及如何解决TT先提前谢过各位了!

-10.2更新:
已解决。在未调用disable_shortcutdisable_user_interaction时调用enable_shortcutenable_user_interaction导致

 楼主| 发表于 2024-9-30 17:39:43 | 显示全部楼层
在按报错检查代码时发现00gamemenu.rpy里
store.suppress_overlay = True这行警告: Use of a store variable that has not been defaulted.",
default _menu = False这行警告:"_menu": Variables may not begin with a single underscore '_' as Ren'Py reserves such variables for its own purposes.
不知道问题是不是出在这里,如果是的话是有什么问题,该如何解决呢TT已善用搜索但未能找到类似问题的解决方法
回复 支持 抱歉

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|RenPy中文空间 ( 苏ICP备17067825号|苏公网安备 32092302000068号 )

GMT+8, 2024-11-15 12:01 , Processed in 0.111232 second(s), 24 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表