python-3.x - ValueError : character U+6573552f. .. Py2aap

标签 python-3.x py2app

我制作了一个非常简单的程序,并尝试将其导出到应用程序文件中。我目前正在使用 Python 3.6 和 py2app 将 py 文件转换为 app。 所以我创建了设置文件:

from setuptools import setup
OPTIONS = {'iconfile':'sc.icns',}

setup(
    app = ['hello.py'],
    options = {
        'py2app': OPTIONS},
    setup_requires = ['py2app']
    )

然后在终端中输入:

python3 hello_setup.py py2app

几秒钟后,它创建了 dist 文件夹,其中有 hello.app,问题是当我运行它时,它会出现一个显示“hello error”的窗口,然后我打开.exec 文件在应用程序中查看终端并显示此错误:

ValueError: character U+6573552f is not in range [U+0000; U+10ffff]

为什么会出现?我如何解决它?非常感谢。

如果需要,这里是'hello.py'的代码

from tkinter import *
from tkinter import messagebox

root = Tk()

def printworld():
    messagebox.showinfo('Hello', 'Hello World')

button1 = Button(root, text='Press me!', command=printworld)
button1.pack()

root.mainloop()

最佳答案

这是最新版本的 py2app==0.14 的问题。

您应该向他们提出问题以在当前版本中修复它。同时,您可以返回一个版本,它会正常工作

pip install py2app==0.13

py2app 0.13

关于python-3.x - ValueError : character U+6573552f. .. Py2aap,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45493029/

相关文章:

python - Seaborn 条形图,其中 2 个条形图具有相同标签

python - 在 OSX 10 上编译期间未找到 py2app 模块

python - 为什么我的本地人没有在 rof 之外更新?

python - tkinter 中带有滚动条的动态按钮 - Python

python - urllib.request.urlretrieve 不通过 HTTPS 下载文件

python - 使用 Pandas 删除 Python 3.4.2 中的标题行

python - 好的 Python 2 音频模块

sqlite - Py2app 不包含 Sqlite 驱动程序 - "Database error: Driver not loaded Driver not loaded"

python - 在应用程序中包含 openssl