天天看點

Flask sqlite3.OperationalError: unable to open database file解決方法

最近學習Flask,按照manual手冊上的方法建立資料庫,報錯 sqlite3.OperationalError: unable to open database file。

網上說:

1、資料庫路改成絕對路徑,并且目錄要存在。

2、資料庫會自動建立,之前自己多此一舉的建了個資料庫,是以有權限問題。

權限的問題,linux下用chmod,windows下用指令:

cacls c:\tmp /e /t /g everyone:F