0

Error while making Calculator using python

I am making a calculator using python and Tkinter. But now I am stuck in an error. its saying , AttributeError: 'NoneType' object has no attribute 'insert' . When i am typing a button in my program its giving me this error. . Can anyone tell me how to solve this error? where to make change for solve this problem? code link-> https://code.sololearn.com/c6O4i4F7o8pk/# Advance Thanks.

27th Apr 2020, 7:51 AM
Md. Mursalatul Islam Pallob
Md. Mursalatul Islam Pallob - avatar
2 ответов
+ 2
Did you have follow some tkinter tuto before starting you tkinter calculator? Because, the way you do in your code is absolutly not the usual way ^^ Usual way is to have a class (defining the window UI) and register it as a tkinker app (with the Tk main class constructor, wich you missuse => the error you're actually facing by running your script). You would be advised to begin by following and practicing at least the quick start tuto from: https://python-textbok.readthedocs.io/en/1.0/Introduction_to_GUI_Programming.html Alternatively you could dive in this stackoverflow thread about tkinter without class, but that's not the recommended way: https://stackoverflow.com/questions/47722336/how-can-i-make-this-function-without-classes-python-3-tkinter
27th Apr 2020, 9:16 AM
visph
visph - avatar
0
Swim sir .. I have edited my question as you said .... Can you help me now please?
27th Apr 2020, 8:42 AM
Md. Mursalatul Islam Pallob
Md. Mursalatul Islam Pallob - avatar