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.
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
0
Swim sir ..
I have edited my question as you said ....
Can you help me now please?