0
我做了一個非常簡單的程序,我試圖將其導出到應用程序文件。我目前使用Python 3.6和py2app將py文件轉換爲app。 所以我創建的安裝文件:ValueError:character U + 6573552f ... Py2aap
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,問題當我運行它,它看來,說「你好錯誤」然後我打開.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()