Python SQLite: database is locked

后端 未结 20 1186
一生所求
一生所求 2020-12-12 14:24

I\'m trying this code:

import sqlite

connection = sqlite.connect(\'cache.db\')
cur = connection.cursor()
cur.execute(\'\'\'create table item
  (id integer p         


        
20条回答
  •  鱼传尺愫
    2020-12-12 15:08

    The database is locked by another process that is writing to it. You have to wait until the other transaction is committed. See the documentation of connect()

提交回复
热议问题