PySimpleGUI 无效的 ASCII 字符

PySimpleGUI invalid ASCII Character

当尝试运行 测试 GUI 以与我正在使用的 ARK 驯服计算器一起使用时,GUI 测试给我错误

回溯(最近调用最后): 文件“GUItest.py”,第 1 行,位于 将 PySimpleGUI 导入为 sg 文件“/home/nunya/.local/lib/python2.7/site-packages/PySimpleGUI/init.py,第 2 行,在 从 .PySimpleGUI 导入 * 文件“/home/nunya/.local/lib/python2.7/site-packages/PySimpleGUI.py”,第 523 行 语法错误:第 523 行文件 /home/nunya/.local/lib/python2.7/site-packages/PySimpleGUI.py 中的非 ASCII 字符 '\xe2',但未声明编码;详情见http://python.org/dev/peps/pep-0263/

查看它提供的网站,我不明白它在说什么,也无法弄清楚 PySimpleGUI.py

有什么问题

根据the documentation(在“Python 版本”下):

As of 9/25/2018 both Python 3 and Python 2.7 are supported when using tkinter version of PySimpleGUI! The Python 3 version is named PySimpleGUI. The Python 2.7 version is PySimpleGUI27.

因此您应该将 PySimpleGUI 替换为 PySimpleGUI27(或切换到 Python 3)。