Skip to content
Advertisement

Error in SQLite ‘all VALUES must have the same number of terms’

Glad to be a part of this platform among you, highly experienced programmers, Nowadays I am working on a POS system project in python, using tkinter for frontend & Sqlite as the database. While putting data into it, I am facing this issue. ”’

”’

What I am trying to do here is retrieving data from the tkinter widget and then uploading it to the database. I would be grateful if you could point out where am going wrong, also if you could tell me if I am using the correct method to retrieve data from the tkinter widget. Thanks Aneesh Mehta

Advertisement

Answer

As far as your code is concerned, ur code has some problems. Tkinter only sends values through buttons.

list is a keyword in python so rename it to list1.

No. of ? is also not matching. You should also not use .get() function of StringVar() within the same frame and instead use it in the proceed_raise_invoice() method.

Inside below function, I have used .get() method of StringVar to get the values stored in StringVar (values typed by users)

Always use get() method inside the function that you have called through tkinter button. It will get the values of StringVar after button is clicked. And dont use .get() of StringVar globally.

you can use sqlite as this:

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