我创建了A' GUI应用程序'使用Python,但是当我通过auto_py_to_exe工具将其转换为EXE文件时,为什么我会收到此错误消息?

发布于 2025-01-31 22:28:30 字数 823 浏览 4 评论 0 原文

我正在用 python 创建 GUI应用程序,但是当我通过 exe 文件将其转换为 auto_py_py_to_exe 工具为什么我收到此错误消息了吗?

错误信息..

Traceback (most recent call last):
  File "School MS.py", line 182, in <module>
  File "tkcalendar\dateentry.py", line 128, in __init__
  File "tkcalendar\calendar_.py", line 258, in __init__
  File "babel\dates.py", line 353, in get_day_names
  File "babel\core.py", line 641, in days
  File "babel\core.py", line 364, in _data
  File "babel\localedata.py", line 141, in load
  File "babel\localedata.py", line 147, in load
ModuleNotFoundError: No module named 'babel.numbers'
[13604] Failed to execute script 'School MS' due to unhandled exception!

[process exited with code 1 (0x00000001)]

I was creating a GUI Application with Python but when I converted it to an EXE file via the auto_py_to_exe tool why did I get this error message?

ERROR message..

Traceback (most recent call last):
  File "School MS.py", line 182, in <module>
  File "tkcalendar\dateentry.py", line 128, in __init__
  File "tkcalendar\calendar_.py", line 258, in __init__
  File "babel\dates.py", line 353, in get_day_names
  File "babel\core.py", line 641, in days
  File "babel\core.py", line 364, in _data
  File "babel\localedata.py", line 141, in load
  File "babel\localedata.py", line 147, in load
ModuleNotFoundError: No module named 'babel.numbers'
[13604] Failed to execute script 'School MS' due to unhandled exception!

[process exited with code 1 (0x00000001)]

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

葮薆情 2025-02-07 22:28:30

This is similar to the issue in How to install python application with tkcalendar module by pyinstaller?

Indeed, after looking into auto-py-to-exe, I realized that this is just a GUI around PyInstaller. Therefore the solution is the same, you need to pass babel.numbers to the --hidden-import option, in the Advanced section in the GUI.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文