Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок0
How to fix "NoneType Error" in Python
getting error in .get() method in python tkinter dont try to run on SoloLearn it won't work https://code.sololearn.com/ce897SmKsFl7/?ref=app
4 ответов
+ 1
Know this...in Tkinter, if you create a widget that uses get or set method, you have to pack, place or grid it seperately.
Also avoid using the same name for variables and widgets to avoid overwriting.
Example:
name = StringVar()
#this would throw Nonetype error if you try to get value from it
a = Entry(variable=name,font='arial 12'). grid(x=4,y=4)
#this won't
a = Entry(variable=name,font='arial 12')
a. grid(x=4,y=4)
Try it out 😃
0
Jan Markus i did have a look
0
Tomiwa Joseph still getting same error