我最近安装了 SerpentAI,但在创建游戏插件时遇到了问题。
运行命令时:
serpent generate game
我提供以下答案:
- RaftWars
-
网页浏览器
What is the name of the game? (Titleized, No Spaces i.e. AwesomeGame):
筏战
游戏是如何启动的? (其中之一:“steam”、“可执行文件”、“web_browser”):
网页浏览器
OFFSHOOT:正在尝试安装 SerpentRaftWarsGame 插件...
OFFSHOOT PLUGIN INSTALL:验证插件依赖项是否已安装...
OFFSHOOT 插件安装:正在安装文件...
安装过程中出现问题...正在恢复!
回溯(最近一次调用最后一次):
文件“c:\users\marce\anaconda3\envs\serpent\lib\runpy.py”,第 193 行,在 _run_module_as_main 中
”main“,mod_spec)
文件“c:\users\marce\anaconda3\envs\serpent\lib\runpy.py”,第 85 行,在 _run_code 中
执行(代码,run_globals)
文件“C:\Users\marce\SerpentAI\plugins\SerpentRaftWarsGamePlugin\plugin.py”,第 28 行,位于
offshoot.executable_hook(SerpentRaftWarsGamePlugin)
文件“c:\users\marce\anaconda3\envs\serpent\lib\site-packages\offshoot\base.py”,第 185 行,在executable_hook 中
插件_类.install()
文件“c:\users\marce\anaconda3\envs\serpent\lib\site-packages\offshoot\plugin.py”,第 35 行,在安装中
cls.install_files()
文件“c:\users\marce\anaconda3\envs\serpent\lib\site-packages\offshoot\plugin.py”,第 118 行,在 install_files 中
提高e
文件“c:\users\marce\anaconda3\envs\serpent\lib\site-packages\offshoot\plugin.py”,第 91 行,在 install_files 中
is_valid, messages = cls._validate_file_for_pluggable(plugin_file_path, file_dict["pluggable"])
文件“c:\users\marce\anaconda3\envs\serpent\lib\site-packages\offshoot\plugin.py”,第 235 行,位于 _validate_file_for_pluggable
raise PluginError("插件定义指定了无效的可插入:%s => %s" % (file_path,可插入))
offshoot.plugin.PluginError:插件定义指定了无效的可插拔:plugins\SerpentRaftWarsGamePlugin\files\serpent_RaftWars_game.py => Game
我遇到了完全相同的问题,我发现它是由于尝试生成与已有插件同名的游戏而引起的。如果您也是这种情况,请进入C:\Users\___\Anaconda3\envs\serpent\plugins
并删除已经存在的插件。之后,再次运行教程的步骤,注意 cd 到C:\Users\___\Anaconda3\envs\serpent\
跑步前conda activate serpent
.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)