alfredfrancis / ai-chatbot-framework

A python chatbot framework with Natural Language Understanding and Artificial Intelligence.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Guys I can't build it

telostia opened this issue · comments

Im using make setup and got errors.
First it asked me for setuptools-39.1.0, i then added setuptools-39.1.0 to requirements.txt then theres more errors regarding averaged_perceptron_tagger' not found, then I installed it and more errors...
I tried changing the files in requirements.txt to: flask_script==2.0.3
, spacy==2.0.11
tensorflow==1.9.0

but i now get :
Failed to load nlu model. Maybe path /root/ai-chatbot-framework/model_files doesn't exist

Traceback (most recent call last):
File "manage.py", line 3, in
from app import app
File "/root/ai-chatbot-framework/app/init.py", line 33, in
from app.endpoint.controllers import endpoint
File "/root/ai-chatbot-framework/app/endpoint/controllers.py", line 224, in
update_model(app, "Models updated")
File "/root/ai-chatbot-framework/app/endpoint/controllers.py", line 212, in update_model
app.config["MODELS_DIR"], app.config["USE_WORD_VECTORS"])
File "/root/ai-chatbot-framework/app/nlu/classifiers/starspace_intent_classifier.py", line 588, in load
return EmbeddingIntentClassifier()
File "/root/ai-chatbot-framework/app/nlu/classifiers/starspace_intent_classifier.py", line 113, in init
self.nlp = spacy.load('en')
File "/root/ai-chatbot-framework/venv/local/lib/python2.7/site-packages/spacy/init.py", line 15, in load
return util.load_model(name, **overrides)
File "/root/ai-chatbot-framework/venv/local/lib/python2.7/site-packages/spacy/util.py", line 119, in load_model
raise IOError(Errors.E050.format(name=name))
IOError: [E050] Can't find model 'en'. It doesn't seem to be a shortcut link, a Python package or a valid path to a data directory.

Hey, same here. Any progress on that ?

You need to install spacy en model. read here

installed spacy en. This is what I did: python -m spacy download en
stil shows errors.

(venv) root@vps:~/ai-chatbot-framework# make run_dev
. venv/bin/activate && python run.py
RuntimeError: module compiled against API version 0xc but this version of numpy is 0xb
RuntimeError: module compiled against API version 0xc but this version of numpy is 0xb

WARNING in starspace_intent_classifier [/root/ai-chatbot-framework/app/nlu/classifiers/starspace_intent_classifier.py:587]:
Failed to load nlu model. Maybe path /root/ai-chatbot-framework/model_files doesn't exist

Traceback (most recent call last):
File "run.py", line 1, in
from app import app
File "/root/ai-chatbot-framework/app/init.py", line 33, in
from app.endpoint.controllers import endpoint
File "/root/ai-chatbot-framework/app/endpoint/controllers.py", line 224, in
update_model(app, "Models updated")
File "/root/ai-chatbot-framework/app/endpoint/controllers.py", line 214, in update_model
synonyms = get_synonyms()
File "/root/ai-chatbot-framework/app/endpoint/utils.py", line 21, in get_synonyms
for entity in Entity.objects:
File "/root/ai-chatbot-framework/venv/local/lib/python2.7/site-packages/mongoengine/queryset/manager.py", line 37, in get
queryset = queryset_class(owner, owner._get_collection())
File "/root/ai-chatbot-framework/venv/local/lib/python2.7/site-packages/mongoengine/document.py", line 199, in _get_collection
cls.ensure_indexes()
File "/root/ai-chatbot-framework/venv/local/lib/python2.7/site-packages/mongoengine/document.py", line 879, in ensure_indexes
collection.create_index(fields, background=background, **opts)
File "/root/ai-chatbot-framework/venv/local/lib/python2.7/site-packages/pymongo/collection.py", line 1958, in create_index
self.__create_index(keys, kwargs, session, **cmd_options)
File "/root/ai-chatbot-framework/venv/local/lib/python2.7/site-packages/pymongo/collection.py", line 1847, in __create_index
with self._socket_for_writes() as sock_info:
File "/root/ai-chatbot-framework/venv/local/lib/python2.7/site-packages/pymongo/collection.py", line 196, in _socket_for_writes
return self.__database.client._socket_for_writes()
File "/root/ai-chatbot-framework/venv/local/lib/python2.7/site-packages/pymongo/mongo_client.py", line 1085, in _socket_for_writes
server = self._get_topology().select_server(writable_server_selector)
File "/root/ai-chatbot-framework/venv/local/lib/python2.7/site-packages/pymongo/topology.py", line 224, in select_server
address))
File "/root/ai-chatbot-framework/venv/local/lib/python2.7/site-packages/pymongo/topology.py", line 183, in select_servers
selector, server_timeout, address)
File "/root/ai-chatbot-framework/venv/local/lib/python2.7/site-packages/pymongo/topology.py", line 199, in _select_servers_loop
self._error_message(selector))
pymongo.errors.ServerSelectionTimeoutError: 127.0.0.1:27017: [Errno 111] Connection refused
Makefile:15: recipe for target 'run_dev' failed
make: *** [run_dev] Error 1

any ideas?

ok i see that it uses mongo db so I installed mongodb server and client(it wasnt listed on the main github requirements).
The results are now:

root@vps:~/ai-chatbot-framework# make run_dev
. venv/bin/activate && python run.py
RuntimeError: module compiled against API version 0xc but this version of numpy is 0xb
RuntimeError: module compiled against API version 0xc but this version of numpy is 0xb

WARNING in starspace_intent_classifier [/root/ai-chatbot-framework/app/nlu/classifiers/starspace_intent_classifier.py:587]:
Failed to load nlu model. Maybe path /root/ai-chatbot-framework/model_files doesn't exist


INFO in utils [/root/ai-chatbot-framework/app/endpoint/utils.py:25]:
loaded synonyms {}


INFO in controllers [/root/ai-chatbot-framework/app/endpoint/controllers.py:220]:
Intent Model updated

  • Running on http://0.0.0.0:8080/ (Press CTRL+C to quit)
  • Restarting with stat
    RuntimeError: module compiled against API version 0xc but this version of numpy is 0xb
    RuntimeError: module compiled against API version 0xc but this version of numpy is 0xb

WARNING in starspace_intent_classifier [/root/ai-chatbot-framework/app/nlu/classifiers/starspace_intent_classifier.py:587]:
Failed to load nlu model. Maybe path /root/ai-chatbot-framework/model_files doesn't exist


INFO in utils [/root/ai-chatbot-framework/app/endpoint/utils.py:25]:
loaded synonyms {}


INFO in controllers [/root/ai-chatbot-framework/app/endpoint/controllers.py:220]:
Intent Model updated

  • Debugger is active!
  • Debugger PIN: xxx-xxx-xxx

It seems like you got it working. So, I'm closing the issue.