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

19th Dec 2020, 7:00 AM
Deepak Jaiswar
Deepak Jaiswar - avatar
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 😃
19th Dec 2020, 8:50 AM
Tomiwa Joseph
Tomiwa Joseph - avatar
0
Jan Markus i did have a look
19th Dec 2020, 7:40 AM
Deepak Jaiswar
Deepak Jaiswar - avatar
0
Tomiwa Joseph still getting same error
19th Dec 2020, 9:37 AM
Deepak Jaiswar
Deepak Jaiswar - avatar