I am using tkinter in Python 3.5 to create a snap app in Ubuntu 16.04. However, I am getting an error. The code goes like this :
import tkinter as tk
class InitialWin(tk.Toplevel):
...
root = tk.Tk()
win = InitialWin(root)
After building the snap and installing it, I am getting an error upon run:
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
Initially, I was getting a error which I solved by referring to this question. But now, I am getting this error. Please suggest a solution.