I get this error from tkinter.Text()
:
>>> import tkinter
>>> tkinter.Text()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.6/tkinter/__init__.py", line 3095, in __init__
Widget.__init__(self, master, 'text', cnf, kw)
File "/usr/lib/python3.6/tkinter/__init__.py", line 2293, in __init__
(widgetName, self._w) + extra + self._options(cnf))
_tkinter.TclError: expected integer but got "sans"
or even tkinter._test()
:
>>> tkinter._test()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.6/tkinter/__init__.py", line 3985, in _test
label = Label(root, text=text)
File "/usr/lib/python3.6/tkinter/__init__.py", line 2760, in __init__
Widget.__init__(self, master, 'label', cnf, kw)
File "/usr/lib/python3.6/tkinter/__init__.py", line 2293, in __init__
(widgetName, self._w) + extra + self._options(cnf))
_tkinter.TclError: expected integer but got "sans"
The message is pretty clear, but I don't know where to start.
EDIT : I got this error when I tried to use matplotlib.pyplot.plot()
. But this worked (no error anymore) for matplotlib
. I didn't find a similar way to deal with tkinter
.