|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
我需要插入一个简单的pygames小游戏,但是它了如下的错误:
I'm sorry, but an uncaught exception occurred.
While running game code:
File "game/script.rpy", line 2, in script
init python:
File "game/script.rpy", line 2, in script
init python:
File "game/script.rpy", line 3, in <module>
import main
NotImplementedError: Could not import pygame_sdl2.font: No module named 'pygame_sdl2.font'
-- Full Traceback ------------------------------------------------------------
Full traceback:
File "D:\renpy\renpy-8-nightly-2022-03-13-e4896d675-sdk\renpy\bootstrap.py", line 284, in bootstrap
renpy.main.main()
File "D:\renpy\renpy-8-nightly-2022-03-13-e4896d675-sdk\renpy\main.py", line 557, in main
renpy.game.context().run(node)
File "game/script.rpy", line 2, in script
init python:
File "/home/tom/ab/nightly-build/tmp/install.linux-x86_64/lib/python3.9/site-packages/future/utils/__init__.py", line 441, in raise_
File "game/script.rpy", line 2, in script
init python:
File "D:\renpy\renpy-8-nightly-2022-03-13-e4896d675-sdk\renpy\ast.py", line 943, in execute
renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
File "D:\renpy\renpy-8-nightly-2022-03-13-e4896d675-sdk\renpy\python.py", line 872, in py_exec_bytecode
exec(bytecode, globals, locals)
File "game/script.rpy", line 3, in <module>
import main
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
File "<frozen importlib._bootstrap>", line 627, in _load_backward_compatible
File "D:\renpy\renpy-8-nightly-2022-03-13-e4896d675-sdk\renpy\loader.py", line 991, in load_module
exec(code, mod.__dict__) # type: ignore
File "main.py", line 1, in <module>
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
File "<frozen importlib._bootstrap>", line 627, in _load_backward_compatible
File "D:\renpy\renpy-8-nightly-2022-03-13-e4896d675-sdk\renpy\loader.py", line 991, in load_module
exec(code, mod.__dict__) # type: ignore
File "game_wuziqi.py", line 3, in <module>
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
File "<frozen importlib._bootstrap>", line 627, in _load_backward_compatible
File "D:\renpy\renpy-8-nightly-2022-03-13-e4896d675-sdk\renpy\loader.py", line 991, in load_module
exec(code, mod.__dict__) # type: ignore
File "constants.py", line 4, in <module>
File "/home/tom/ab/nightly-build/tmp/install.linux-x86_64/lib/python3.9/site-packages/pygame_sdl2/__init__.py", line 33, in __getattr__
NotImplementedError: Could not import pygame_sdl2.font: No module named 'pygame_sdl2.font'
Windows-10-10.0.22000
Ren'Py 8.0.0.22031201n
ThreeKingdoms_game 1.0
Wed Mar 16 17:58:40 2022
我已经试过了包括但不限于:在游戏中安装pygame,在游戏中安装pygame_sdl2,但是仍未解决。我现在急需解决方法!
|
|