I am using the RasaNLUHttpInterpreter as stated here to start my server. I give the class all the 4 parameters required (model-name, token, server-name, and project-name). However, I always get the error, that apparently I am handing over 5 arguments (what I don’t really do).
The error occurred since I updated my Rasa-Core and NLU to the latest version. However, as in docs, I feel that I use the method correctly. Does anyone have an idea what I am doing wrong or what’s happening here?
Here is my run-server.py where I use the RasaNLUHttpInterpreter:
import os
from os import environ as env
from gevent.pywsgi import WSGIServer
from server import create_app
from rasa_core import utils
from rasa_core.interpreter import RasaNLUHttpInterpreter
utils.configure_colored_logging("DEBUG")
user_input_dir = "/app/nlu/" + env["RASA_NLU_PROJECT_NAME"] + "/user_input"
if not os.path.exists(user_input_dir):
os.makedirs(user_input_dir)
nlu_interpreter = RasaNLUHttpInterpreter(
'model_20190702-103405', None, 'http://rasa-nlu:5000', 'test_project')
app = create_app(
model_directory = env["RASA_CORE_MODEL_PATH"],
cors_origins="*",
loglevel = "DEBUG",
logfile = "./logs/rasa_core.log",
interpreter = nlu_interpreter)
http_server = WSGIServer(('0.0.0.0', 5005), app)
http_server.serve_forever()
rasa-core_1 | Traceback (most recent call last):
rasa-core_1 | File "run_server.py", line 23, in <module>
rasa-core_1 | 'model_20190702-103405', None, 'http://rasa-nlu:5000', 'test-project')
rasa-core_1 | TypeError: __init__() takes from 1 to 4 positional arguments but 5 were given
chat-ui_1 | Starting the development server...
chat-ui_1 |
schul_cloud_cui_rasa-core_1 exited with code 1
rasa-core_1 | 2019-07-03 09:10:39 WARNING server - Failed to load any agent model. Running Rasa Core server with out loaded model now. load() got an unexpected keyword argument 'action_factory
What is that “agent model”? And the “action factory”?
actually you should have trained a model haven’t you? If you are using the models folder for it, there should be a subdirectory called “nlu”? Can you maybe post a screenshot of that directory?
The setup is not how it should be right? I was thinking about starting all over again as after the update it all got worse and difficult.
The error was the same:
rasa-core_1 | 2019-07-03 09:38:07 WARNING server - Failed to load any agent model. Running Rasa Core server with out loaded model now. load() got an unexpected keyword argument 'action_factory'
I could give you access to the GitHub repo if that would help? But I don’t really want to take so much of your time.
to be honest, that would be great… I doubt that it it will be easy to find the problem via a forum ping-pong. Most of the problems heading into this direction are solved by understanding the big picture behind the bot and then discuss the best way to implement it.
How about collaborating via GitHub and start it by discussing the functionalities? If you want to do this, just write to juliangerhard21@gmail.com.
As soon as I figured out the problem in this specific case, I’d post the solution here anyway such that every user as a return on invest reading this.
I would like to know if you managed to solve this issue and if so, what was the solution? Because I see @threxx also asked this on Stackoverflow and we don’t want to leave that post with no solution - let us know if you need any more assistance in fixing this issue.
I have set up the original environment and to be honest - I couldn’t reproduce the error. Both rasa_nlu and rasa_core worked as expected. The problem might have its origin in the case specific setup from threxx. I will investigate this further - maybe there was a dependency incompatibility.
Tomorrow I will run another test with the original data but I doubt that this caused the error since it seems to be something library specific.
I’ll keep you updated. Should I post this intermediate-result to stackoverflow yet?