Issue with Rasa skill in Docker

Hi, wondering if anyone can help me.

I’m trying to run the rasa_skill in Docker but whenever I try and POST a message to it I get the following error:

File “/venv/rasa_skill/lib/python3.7/site-packages/starlette-0.12.8-py3.7.egg/starlette/middleware/errors.py”, line 155, in call
await self.app(scope, receive, _send)
File “/venv/rasa_skill/lib/python3.7/site-packages/starlette-0.12.8-py3.7.egg/starlette/exceptions.py”, line 73, in call
raise exc from None
File “/venv/rasa_skill/lib/python3.7/site-packages/starlette-0.12.8-py3.7.egg/starlette/exceptions.py”, line 62, in call
await self.app(scope, receive, sender)
File “/venv/rasa_skill/lib/python3.7/site-packages/starlette-0.12.8-py3.7.egg/starlette/routing.py”, line 590, in call
await route(scope, receive, send)
File “/venv/rasa_skill/lib/python3.7/site-packages/starlette-0.12.8-py3.7.egg/starlette/routing.py”, line 208, in call
await self.app(scope, receive, send)
File “/venv/rasa_skill/lib/python3.7/site-packages/starlette-0.12.8-py3.7.egg/starlette/routing.py”, line 41, in app
response = await func(request)
File “/venv/rasa_skill/lib/python3.7/site-packages/fastapi-0.38.1-py3.7.egg/fastapi/routing.py”, line 111, in app
raw_response = await dependant.call(**values)
File “/base/DeepPavlov/deeppavlov/utils/server/server.py”, line 173, in answer
return interact(model, item.dict())
File “/base/DeepPavlov/deeppavlov/utils/server/server.py”, line 98, in interact
prediction = model(*model_args)
File “/base/DeepPavlov/deeppavlov/core/common/chainer.py”, line 205, in call
return self._compute(*args, param_names=self.in_x, pipe=self.pipe, targets=self.out_params)
File “/base/DeepPavlov/deeppavlov/core/common/chainer.py”, line 228, in _compute
res = component(*x)
File “/base/DeepPavlov/deeppavlov/skills/rasa_skill/rasa_skill.py”, line 87, in call
results = self.ioloop.run_until_complete(asyncio.gather(*futures))
File “uvloop/loop.pyx”, line 1394, in uvloop.loop.Loop.run_until_complete
File “/usr/local/lib/python3.7/asyncio/tasks.py”, line 614, in ensure_future
raise ValueError(‘loop argument must agree with Future’)

Any help would be appreciated.

A similar error occurs with asyncio when trying to run directly with python:

2019-10-02 16:48:28.275 INFO in ‘deeppavlov.skills.rasa_skill.rasa_skill’[‘rasa_skill’] at line 52: path to RASA models is: /home/shay/Projects/chtbt/rasa_bots/showandtell/models
Traceback (most recent call last):
File “rasa_example.py”, line 11, in
responses = agent([“Hello”])
File “/home/shay/devenv/lib/python3.6/site-packages/deeppavlov/core/agent/agent.py”, line 72, in call
responses_batch = self._call(utterances_batch, utterances_ids)
File “/home/shay/devenv/lib/python3.6/site-packages/deeppavlov/agents/default_agent/default_agent.py”, line 86, in _call
predicted, confidence = skill(skill_i_utt_batch, skill_i_utt_ids)
File “/home/shay/devenv/lib/python3.6/site-packages/deeppavlov/core/agent/agent.py”, line 146, in call
predicted, confidence, *states = self.skill(utterances_batch, history_batch, states_batch)
File “/home/shay/devenv/lib/python3.6/site-packages/deeppavlov/skills/rasa_skill/rasa_skill.py”, line 87, in call
results = self.ioloop.run_until_complete(asyncio.gather(*futures))
File “uvloop/loop.pyx”, line 1417, in uvloop.loop.Loop.run_until_complete
File “/home/shay/devenv/lib/python3.6/site-packages/deeppavlov/skills/rasa_skill/rasa_skill.py”, line 103, in rasa_confident_response_decorator
resp = await self.rasa_handle_text_verbosely(rasa_agent, text_message, sender_id)
File “/home/shay/devenv/lib/python3.6/site-packages/deeppavlov/skills/rasa_skill/rasa_skill.py”, line 174, in rasa_handle_text_verbosely
action, policy, confidence = processor.predict_next_action(tracker)
File “/home/shay/devenv/lib/python3.6/site-packages/rasa/core/processor.py”, line 180, in predict_next_action
action_confidences, policy = self._get_next_action_probabilities(tracker)
File “/home/shay/devenv/lib/python3.6/site-packages/rasa/core/processor.py”, line 565, in _get_next_action_probabilities
return self.policy_ensemble.probabilities_using_best_policy(
AttributeError: ‘NoneType’ object has no attribute ‘probabilities_using_best_policy’

What is you RASA policy configuration?
It seems that your processor lacks of policy_ensemble (in the second issue).