Sqlite3, OperationalError: unable to open database file

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

    This worked for me:

    conn = sqlite3.connect("C:\\users\\guest\\desktop\\example.db")
    

    Note: Double slashes in the full path

    Using python v2.7 on Win 7 enterprise and Win Xp Pro

    Hope this helps someone.

提交回复
热议问题