Hello,
Dans la console python, lorsque je crée une variable a l'aide de StringVar() (ou IntVar() etc...) On me renvoi l'erreur suivante:
J'ai pourtant croisé de nombreux tutoriels dans lesquels cette instruction ne pose aucun problème...
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10 >>> from Tkinter import * >>> i = StringVar() Traceback (most recent call last): File "<stdin>", line 1, in ? File "/usr/lib/python2.4/lib-tk/Tkinter.py", line 228, in __init__ Variable.__init__(self, master) File "/usr/lib/python2.4/lib-tk/Tkinter.py", line 179, in __init__ self._tk = master.tk AttributeError: 'NoneType' object has no attribute 'tk'
![]()
Partager