0

我在 Python 3.5 中使用 tkinter 在 Ubuntu 16.04 中创建快照应用程序。但是,我收到一个错误。代码如下:

import tkinter as tk

class InitialWin(tk.Toplevel):
    ...

root = tk.Tk() 
win = InitialWin(root)

构建快照并安装后,运行时出现错误:

Traceback (most recent call last):
  File "/snap/minimal-snip/x12/bin/minimal-snip", line 488, in 
<module>
    win = InitialWin(root)
  File "/snap/minimal-snip/x12/bin/minimal-snip", line 45, in __init__
    foreground='#FFFFFF')
  File "/snap/minimal-snip/x12/usr/lib/python3.5/tkinter/__init__.py", 
line 2212, in __init__
    Widget.__init__(self, master, 'button', cnf, kw)
  File "/snap/minimal-snip/x12/usr/lib/python3.5/tkinter/__init__.py", 
line 2142, in __init__
    (widgetName, self._w) + extra + self._options(cnf))
_tkinter.TclError: failed to allocate font due to internal system font 
engine problem

最初,我遇到了一个错误,我通过参考这个问题解决了这个错误。但是现在,我收到了这个错误。请提出解决方案。

4

0 回答 0