Chatterbot Django 和 Heroku(问题 运行 示例)
Chatterbot Django and Heroku (Issues Running Example)
我现在遇到了几个问题,我几乎已经在 Heroku 上为 Django 运行 工作了 Chatterbot 示例。
这是我的示例页面。
https://polar-basin-92507.herokuapp.com/
查看日志,问题似乎是
OperationalError: no such table: django_chatterbot_statement
完整日志https://hastebin.com/mucanobuki.sql
git 来源 https://github.com/gunthercox/ChatterBot/tree/master/examples/django_app/example_app
据我所知,他们的示例设置为使用 sqlite3,但 heroku 不支持它,我需要以某种方式将其切换到 postgres?不确定,这是我需要一些指导的地方。
您需要在 heroku 中设置 Postgresql。只需在找到 here
的 settings.py 文件中添加这些行
import dj_database_url
db_from_env = dj_database_url.config()
DATABASES['default'].update(db_from_env)
我现在遇到了几个问题,我几乎已经在 Heroku 上为 Django 运行 工作了 Chatterbot 示例。
这是我的示例页面。 https://polar-basin-92507.herokuapp.com/
查看日志,问题似乎是
OperationalError: no such table: django_chatterbot_statement
完整日志https://hastebin.com/mucanobuki.sql
git 来源 https://github.com/gunthercox/ChatterBot/tree/master/examples/django_app/example_app
据我所知,他们的示例设置为使用 sqlite3,但 heroku 不支持它,我需要以某种方式将其切换到 postgres?不确定,这是我需要一些指导的地方。
您需要在 heroku 中设置 Postgresql。只需在找到 here
的 settings.py 文件中添加这些行import dj_database_url
db_from_env = dj_database_url.config()
DATABASES['default'].update(db_from_env)