I am trying to insert all list values ββinto my sqlite3 database. When I model this query using the python interactive interpreter, I can correctly insert a single value into the database. But my code does not work when using iteration:
... connection=lite.connect(db_name) cursor=connection.cursor() for name in match: cursor.execute("""INSERT INTO video_dizi(name) VALUES (?)""",(name,)) connection.commit() ... error:cursor.execute("""INSERT INTO video_dizi(name) VALUES (?)""",(name,)) sqlite3.OperationalError: database is locked
Any way to overcome this problem?
python sqlite sqlite3
Fish
source share