Skip to content
Advertisement

TypeError occurs when trying to close Tkinter window in Python

I am currently working on a coursework project for school and it is a database system with a user interface using Tkinter, Python and SQLite3.I made this function to close the window, however the following error is being displayed. I have attached a snippet of the code and a photo of the form.

Exception in Tkinter callback Traceback (most recent call last): File “C:UsersRyanAppDataLocalProgramsPythonPython38-32libtkinter_init_.py”, line 1883, in call return self.func(*args) TypeError: quit() takes 0 positional arguments but 1 was given

JavaScript

enter image description here

Advertisement

Answer

Basic class mistake. All methods must have ‘self’ as the first argument.

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement