gunthercox / ChatterBot

ChatterBot is a machine learning, conversational dialog engine for creating chat bots
https://chatterbot.readthedocs.io
BSD 3-Clause "New" or "Revised" License
14.09k stars 4.44k forks source link

Can't run the Django example. #2232

Open Crysflair opened 2 years ago

Crysflair commented 2 years ago

This is my environment by pip list:

Package                       Version
----------------------------- ----------
alabaster                     0.7.12
asgiref                       3.4.1
Babel                         2.9.1
bleach                        4.1.0
blis                          0.2.4
certifi                       2021.10.8
charset-normalizer            2.0.10
ChatterBot                    1.0.8
chatterbot-corpus             1.2.0
click                         8.0.3
colorama                      0.4.4
coverage                      6.2
coveralls                     3.3.1
cymem                         2.0.6
de-core-news-sm               2.1.0
Django                        2.2.26
django-bootstrap3             21.2
docopt                        0.6.2
docutils                      0.17.1
en-core-web-sm                2.1.0
flake8                        4.0.1
idna                          3.3
imagesize                     1.3.0
importlib-metadata            4.2.0
Jinja2                        3.0.3
joblib                        1.1.0
keyring                       23.5.0
MarkupSafe                    2.0.1
mathparse                     0.1.2
mccabe                        0.6.1
murmurhash                    1.0.6
nltk                          3.6.7
nose                          1.3.7
numpy                         1.21.5
oauthlib                      3.1.1
packaging                     21.3
Pint                          0.18
pip                           21.3.1
pkginfo                       1.8.2
plac                          0.9.6
preshed                       2.0.1
pycodestyle                   2.8.0
pyflakes                      2.4.0
Pygments                      2.11.2
pymongo                       3.12.3
pyparsing                     3.0.6
python-dateutil               2.8.2
pytz                          2021.3
pywin32-ctypes                0.2.0
PyYAML                        5.3.1
readme-renderer               32.0
regex                         2021.11.10
requests                      2.27.1
requests-oauthlib             1.3.0
requests-toolbelt             0.9.1
rfc3986                       1.5.0
setuptools                    60.2.0
six                           1.16.0
snowballstemmer               2.2.0
spacy                         2.1.9
Sphinx                        3.0.4
sphinx-rtd-theme              1.0.0
sphinxcontrib-applehelp       1.0.2
sphinxcontrib-devhelp         1.0.2
sphinxcontrib-htmlhelp        2.0.0
sphinxcontrib-jsmath          1.0.1
sphinxcontrib-qthelp          1.0.3
sphinxcontrib-serializinghtml 1.1.5
SQLAlchemy                    1.3.24
sqlparse                      0.4.2
srsly                         1.0.5
thinc                         7.0.8
tqdm                          4.62.3
twine                         3.7.1
twython                       3.9.1
typing_extensions             4.0.1
urllib3                       1.26.7
wasabi                        0.9.0
webencodings                  0.5.1
wheel                         0.37.1
zipp                          3.7.0

I encountered several problems while attempting to run the Django example. The first one is <frozen importlib._bootstrap>, which I somehow fixed with installing django-bootstrap3 (but pip warns potential uncompetible).

Also, what the README.rst suggests, running python manage.py runserver 0.0.0.0:8000 won't succeed. I only loaded a page with the localhost IP address. Then Django gave errors concerning MIDDLEWARE, which is a key not even exist in settings.py (but MIDDLEWARE_CLASSES).

I followed Django's suggestion and finally successfully loaded the interface. However, the bot won't respond to my input. The terminal outputs: django.db.utils.OperationalError: no such table: django_chatterbot_statement.

I have given up. There must be many undiscovered problems behind all of these! Help!

liulu1998 commented 2 years ago

Before start Django server, run python manage.py migrate to create database.