2

我正在使用 Ubuntu 16.04 服务器,我创建了一个烧瓶应用程序并使用 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

当我单独运行它时,它正在运行,但是当我使用烧瓶应用程序时,它给出了一个错误。

我已经把错误日志

[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)

4

1 回答 1

3

我已经找到了解决方案。这个问题有两个主要的解决方案。

  1. 授予文件权限sudo chomd -R 777 db.sqlite3
  2. 将 apache_wsgi 作为当前 ubuntu 用户名 user=name 执行,使用以下参考
于 2019-01-25T04:36:53.613 回答