Python 当py2app应用程序不工作时,如何修复py2app?

Python 当py2app应用程序不工作时,如何修复py2app?,python,macos,python-3.x,macos-sierra,py2app,Python,Macos,Python 3.x,Macos Sierra,Py2app,我有一个简单的应用程序,名为test.py: import tkinter a=tkinter.Tk() tkinter.Label(a,text='hello!').pack() a.mainloop() 我制作了一个文件夹,名为test。我激活了virtualenv,生成setup.py,然后是“python3 setup.py py2app”。最后,它显示“完成!”(这意味着py2app工作正常,没有任何问题。)但当我双击dist目录中的test.app时,它失败了。(测试错误)。你知道

我有一个简单的应用程序,名为test.py:

import tkinter
a=tkinter.Tk()
tkinter.Label(a,text='hello!').pack()
a.mainloop()
我制作了一个文件夹,名为test。我激活了virtualenv,生成setup.py,然后是“python3 setup.py py2app”。最后,它显示“完成!”(这意味着py2app工作正常,没有任何问题。)但当我双击dist目录中的test.app时,它失败了。(测试错误)。你知道为什么会出现这个问题吗?我怎样才能解决它? 这是我运行/test.app/Contents/MacOS/test时的错误消息:

Contents/MacOS/test ; exit;
 Traceback (most recent call last):
 File > "/Users/dariushmazlumi/Desktop/test/dist/test.app/Contents/Resources/__boo> t__.py", line 98, in <module>
   _run()
 File > "/Users/dariushmazlumi/Desktop/test/dist/test.app/Contents/Resources/__boo> t__.py", line 82, in _run
   exec(compile(source, path, 'exec'), globals(), globals())
 File > "/Users/dariushmazlumi/Desktop/test/dist/test.app/Contents/Resources/test.> py", line 1, in <module>
  import tkinter
 File "<frozen importlib._bootstrap>", line 961, in _find_and_load
 File "<frozen importlib._bootstrap>", line 950, in > _find_and_load_unlocked
 File "<frozen importlib._bootstrap>", line 646, in _load_unlocked
 File "<frozen importlib._bootstrap>", line 616, in_load_backward_compatible
 File "tkinter/__init__.pyc", line 36, in <module>
ValueError: character U+6573552f is not in range [U+0000; U+10ffff]
2017-09-06 14:08:17.090 test[1999:115511] test Error
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
Deleting expired sessions...99 completed.
[Process completed]
Contents/MacOS/test;出口
回溯(最近一次呼叫最后一次):
文件>“/Users/dariushmazlumi/Desktop/test/dist/test.app/Contents/Resources/\uuuu boo>t\uuuu.py”,第98行,在
_运行()
文件>“/Users/dariushmazlumi/Desktop/test/dist/test.app/Contents/Resources/\uuu boo>t\uuuu.py”,第82行,正在运行
exec(编译(源代码,路径,'exec'),globals(),globals())
文件>“/Users/dariushmazlumi/Desktop/test/dist/test.app/Contents/Resources/test.>py”,第1行,在
进口tkinter
文件“”,第961行,在“查找”和“加载”中
文件“”,第950行>\u查找和加载\u解锁
文件“”,第646行,在“加载”中
文件“”,第616行,in_load_backward_compatible
文件“tkinter/_init__.pyc”,第36行,在
ValueError:字符U+6573552f不在范围[U+0000;U+10ffff]
2017-09-06 14:08:17.090测试[1999:115511]测试错误
注销
正在保存会话。。。
…复制共享历史。。。
…保存历史记录…截断历史记录文件。。。
…已完成。
删除过期会话…99已完成。
[程序已完成]

我正在使用macOS sierra 10.12。

哇!我在这里搜索了py2app错误,有人也有同样的问题。降级到py2app 0.12修复了我的错误。(五月py2app为0.14)。谢谢大家,你们是如何帮助我的。

你们认为这是py2app中的一个bug吗?如果是,如何报告?我安装了一个虚拟macOS sierra并在那里试用了py2app。同样的错误信息!