renpy - “没有名为集合的模块”ren'py
问题描述
好的,我正在翻译一个游戏,一部名为“katawa shoujo”的视觉小说,确切地说是该游戏的测试版,它不是西班牙语的我得到了测试版文件并将它们移动到 ren'py(它的创建位置)在 ren'py 中运行它时出现此错误:
File "C:\Users\Anthony\Desktop/game/ui_ingamemenu.rpy", line 1, in script
File "C:\Users\Anthony\Desktop/game/ui_ingamemenu.rpy", line 1, in script
File "C:\Users\Anthony\Desktop/game/ui_ingamemenu.rpy", line 2, in <module>
ImportError: No module named sets
-- Full Traceback ------------------------------------------------------------
Full traceback:
File "renpy/bootstrap.py", line 326, in bootstrap
renpy.main.main()
File "renpy/main.py", line 515, in main
renpy.game.context().run(node)
File "C:\Users\Anthony\Desktop/game/ui_ingamemenu.rpy", line 1, in script
File "C:\Users\Anthony\Desktop/game/ui_ingamemenu.rpy", line 1, in script
File "renpy/ast.py", line 923, in execute
renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
File "renpy/python.py", line 2235, in py_exec_bytecode
exec(bytecode, globals, locals)
File "C:\Users\Anthony\Desktop/game/ui_ingamemenu.rpy", line 2, in <module>
ImportError: No module named sets
Windows-10-10.0.19041
Ren'Py 7.4.8.1895
Sat Sep 25 20:22:04 2021"
I suppose that the error is in the files of the program by the address of folders that it marks:
```While running game code:
File "C:\Users\Anthony\Desktop/game/ui_ingamemenu.rpy", line 1, in script"
but it marks that the user is "anthony" but my user is "A" ... I am very lazy with names xd
I don't have much experience so I would like you to help me, thank you
by the way, I use Atom to edit the scripts
If you need the files, I leave a download link for these:
https://www.mediafire.com/file/10ld61gyzipn0ar/Katawa_Shoujo_Beta_%2528Proyecto_de_traduccion%2529.rar/file?fbclid=IwAR14jNyYJbyyhaS6S2XEU2re5zD6Af2plIyhV40F9hH7ammfE_qaRIfJTVs
解决方案
我会输入它提到的文件并删除行导入集。我猜这是一个非常古老的测试版,对吧?在 Python 的更新版本中,您不再需要导入“set”库,因为它是自动包含的(可以在此处查看)。如果您之前没有编程经验:打开名为“ui_ingamemenu.rpy”的文件。在第 1 行应该有一行写着“导入集”。把那个删掉就行了。但是,如果不知道您正在使用的文件,就很难知道确切的问题。
不过,Renpy 不会一次全部显示错误。它停在它检测到的第一个。所以一旦你解决了这个问题,可能会出现更多。
布埃纳苏尔特 :)
推荐阅读
- oracle - 如何在弹出窗口中执行和获取光标输入?
- c# - 恒定和静态场
- tensorflow-lite - 是否可以训练具体功能?
- java - 初始化整数被称为 charAt 的索引值,但是我不能减少索引整数的值
- javascript - 如何使用 gatsby-image 显示图像而不进行裁剪?
- centos - 在centos 7上安装gitlab后出现错误422
- php - require_once 没有在 PHP 中加载文件
- jsf - p:commandLink actionListener 切换到 Primefaces 7.0 后不再调用
- go - 在 go 中使用 Telnet 客户端读取数据
- apache-zeppelin - 我如何通过 env 变量提供 zeppelin jdbc 解释器密码