This question has already been answered:
There is a table creation method
def dbMaker(): conn = sqlite3.connect(sqlite_file) conn.execute('''CREATE TABLE Goods (Gtin INT NOT NULL, Length INT NOT NULL, Width INT NOT NULL, Height INT NOT NULL, Weight INT NOT NULL, Data Text NOT NULL, Multuplicator INT, Gtin2 Text );''') print('Table were created') There is also a method to insert
def insert(lineList): conn = sqlite3.connect(sqlite_file) c = conn.cursor() for item in lineList: c.execute('insert into Goods values (?,?,?,?,?,?,?,?)', item)) Served as input list
ar=[1,2,3,4,5,'6',7,'8'] insert(ar) I get the error ValueError: parameters are of unsupported type
In the table and in the list, the types are the same ..
itemat a time and not the entirelineList. that is,c.execute('insert into Goods values (?,?,?,?,?,?,?,?)', item)looks like this for the first in forc.execute('insert into Goods values (?,?,?,?,?,?,?,?)', 1)- Batanichekc.execute('insert into Goods values (?,?,?,?,?,?,?,?)', lineList)- Batanichek