Sqlite3, OperationalError: unable to open database file

前端 未结 19 1588
再見小時候
再見小時候 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:33

    I faced the same problem on Windows 7. My database name was test and I got the error:

    self.connection = Database.connect(**kwargs)
    sqlite3.OperationalError: unable to open database file
    

    I replaced test with test.db and and all went smooth.

提交回复
热议问题