问题描述
我正在尝试将我的.py文件转换为.exe。我在我的.py文件中使用kivy。我意识到发现致命错误。如果我使用 SoundLoader.load('test.wav')无法执行脚本主要错误。 main.py:
from kivy.app import App
from kivy.core.audio import SoundLoader
from kivy.uix.screenmanager import ScreenManager
class Manager(ScreenManager):
sound = SoundLoader.load('test.wav')
sound.play()
class testapp(App):
def build(self):
return Manager()
if __name__ == '__main__':
testapp().run()
如果我运行.py文件,则会在Windows和Linux系统上发出声音。我按照以下步骤创建了我的exe:KIVY package for Windows。如果我不使用SoundLoader行,我的exe将运行。但是,如果我添加了它,由于出现此错误,我什至无法打开控制台或应用程序。感谢您的建议。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)