[英]sqlite3.OperationalError: unable to open database file - error occurs after a certain while
[英]error when flask app with chatter bot hosted with a wsgi script [sqlite3.OperationalError) unable to open database file]
我正在使用 Ubuntu 16.04 服務器,並且我創建了一個 Flask 應用程序並使用 apache_wsgi 腳本進行托管。 個人。 我的python文件如下
chatbot = ChatBot( 'Dan', storage_adapter="chatterbot.storage.SQLStorageAdapter" ) chatbot.set_trainer(ChatterBotCorpusTrainer) chatbot.train(` `"chatterbot.corpus.english.greetings" ) def chat(text): response = chatbot.get_response(text) if response.confidence >= 0.8: return response else: pass
當我單獨運行它時,它正在運行,但是當我使用 Flask 應用程序時,它給出了一個錯誤。
我已經把錯誤日志
[client 71.6.232.4:41358] sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) unable to open database file (Background on this error at: http://sqlalche.me/e/e3q8)
我已經找到了解決方案。 這個問題有兩個主要的解決方案。
sudo chomd -R 777 db.sqlite3
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.