Sqlite3, OperationalError: unable to open database file

前端 未结 19 1637
再見小時候
再見小時候 2020-11-27 18:58

Question: Why can\'t I open the database?


Info: I\'m working on a project using sqlite3 database. I wrote a test program that runs and passes it t

19条回答
  •  青春惊慌失措
    2020-11-27 19:14

    If this happens randomly after correctly being able to access your database (and no settings have changed), it could be a result of a corrupted database.

    I got this error after trying to write to my database from two processes at the same time and it must have corrupted my db.sqlite3 file.

    My solution was to revert back to a previous commit before the corruption happened.

提交回复
热议问题