Skip to content
Advertisement

sqlite3.OperationalError python

so what i’am basically trying to do is getting data from a from developed with pyqt and insert it into a database, the problem is with my ID column,this is the code i’am using to insert the data to the database :

JavaScript

i always get this error :

JavaScript

when i enter a query to insert into the table directly from sqlite cli i get the results desired without needing to insert the ID it automatically autoincrements

here is the output of the .schema command :

JavaScript

Advertisement

Answer

You need to pass a list of columns:

JavaScript

The only way to skip the list is to pass all 7 columns.

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