Search code examples
rasa-nlurasa-core

Rasa - Failed to load any agent model


I'm using Rasa for a chatbot project. It worked fine before, but right now I needed to make it run on another machine (Ubuntu, with python 3.6) and I get strange errors.

Here are my installation commands :

pip3 install rasa_nlu
pip3 install rasa_nlu[spacy]
pip3 install -U spacy
python3 -m spacy download fr
pip3 install rasa_core

Then I trained rasa-nlu :

python3 -m rasa_nlu.train -d data/intents.md -c config.yml

The server runs with this command :

python3 -m rasa_nlu.server --path models/nlu -c config.yml

I trained rasa-core :

python3 -m rasa_core.train -s data/stories.md -d domain.yml -o models/dialogue --epochs 300

But when I tried to run the core server with this command :

python3 -m rasa_core.server -d models/dialogue -u models/nlu/default/myproject -o out.log

I got this error :

Failed to load any agent model.
Running Rasa Core server with out loaded model now.
The model version is to old to be loaded by this Rasa NLU instance.
Either retrain the model, or run with an older version.
Model version: 0.11.3
Instance version: 0.12.3

I changed "rasa_nlu_version" to "0.12.3" in models/nlu/default/myproject/metadata.json.

Now I get this error :

Failed to load any agent model.
Running Rasa Core server with out loaded model now.
'str' objet has no attribute 'get'

Can someone help me debug this ? Thanks.


Solution

  • Your answer lies in the error message itself.

    Either retrain the model, or run with an older version.

    Simply re-train the model and run the server and rasa_core again. Make sure that the model you're using to run the server is the same one specified in the training config file. i.e. ensure that you are loading the same model that you just trained and not an old model.

    P.S.Changing the metadata.json file is a bad idea. It's created automatically when you train a model.