I am encountering an error after migrating a WeatherBot-inspired chatbot from Rasa Core 0.10 / Rasa NLU 0.12 to their corresponding, latest versions.
The error
I am confronted to the following error when I talk to the bot in the command line:
Bot loaded. Type a message and press enter (use '/stop' to exit):
hey
Exception in thread Thread-1:
Traceback (most recent call last):
File "C:\Users\a.lecigne\AppData\Local\Continuum\anaconda3\Lib\threading.py", line 916, in _bootstrap_inner
self.run()
File "C:\Users\a.lecigne\AppData\Local\Continuum\anaconda3\Lib\threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "C:\Users\a.lecigne\.virtualenvs\bot-engine-a3KaQZ9S\lib\site-packages\rasa_core\channels\console.py", line 110, in record_messages
for response in bot_responses:
File "C:\Users\a.lecigne\.virtualenvs\bot-engine-a3KaQZ9S\lib\site-packages\rasa_core\channels\console.py", line 69, in send_message_receive_stream
r.raise_for_status()
File "C:\Users\a.lecigne\.virtualenvs\bot-engine-a3KaQZ9S\lib\site-packages\requests\models.py", line 939, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: http://localhost:5005/webhooks/rest/webhook?stream=true&token=
Details
I applied the necessary modifications according to the migration guide:
I included an endpoints.yml file that looks like this:
INFO:__main__:Starting action endpoint server...
INFO:rasa_core_sdk.executor:Registered function for 'do_weather_api'.
INFO:__main__:Action endpoint is up and running. on ('0.0.0.0', 5055)
Here are my actions.py and domain.yml files for reference : here.
I’d be very grateful for any help with this problem.
Unsurprisingly, still the same error using a simple script:
from rasa_core import run
from rasa_core.agent import Agent
def launch():
agent = Agent.load("models/dialogue")
run.serve_application(agent, channel='cmdline')
if __name__ == '__main__':
launch()
Error:
Bot loaded. Type a message and press enter (use '/stop' to exit):
/greet
Exception in thread Thread-1:
Traceback (most recent call last):
File "C:\Users\a.lecigne\AppData\Local\Continuum\anaconda3\Lib\threading.py", line 916, in _bootstrap_inner
self.run()
File "C:\Users\a.lecigne\AppData\Local\Continuum\anaconda3\Lib\threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "C:\Users\a.lecigne\.virtualenvs\rasa-quickstart-kxlx6eU3\lib\site-packages\rasa_core\channels\console.py", line 110, in record_messages
for response in bot_responses:
File "C:\Users\a.lecigne\.virtualenvs\rasa-quickstart-kxlx6eU3\lib\site-packages\rasa_core\channels\console.py", line 69, in send_message_receive_stream
r.raise_for_status()
File "C:\Users\a.lecigne\.virtualenvs\rasa-quickstart-kxlx6eU3\lib\site-packages\requests\models.py", line 939, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: http://localhost:5005/webhooks/rest/webhook?stream=true&token=
I’m not sure this is a Rasa problem, but I’m still at a loss for solutions…
Hm, I’m not sure what’s going wrong with the Quickstart, because when i run it on the page, it’s fine. Can you try upgrading to 0.11.3? Not sure that’ll solve it though, do you have any restrictions on your machine regarding running things on localhost? Because it’s the right url that’s being called for sure
Thank you @akelad. I just posted an issue on Github about this too, just in case it makes things easier for your team (I hope it does, if not do not hesitate to close it )
I tried running the Quickstart on all 0.11.* versions, including 0.11.3, and the problem is the same. I don’t have any restrictions on localhost - this is a dev machine and I use a lot of servers on localhost. Everything works well in Rasa Core 0.10.4.
I really don’t know what I could try to pinpoint the problem. I tried changing the default port but that doesn’t fix it.
Edit: same problem with bleeding edge Rasa Core from Github.
@alecigne I just got this error resolved. I had applied http_proxy which was creating this error. Kindly remove any http_proxy from the environment variables if you are working behind a corporate firewall.
This code indicates that the server has received and is processing the request, but no response is available yet. The request has been received but not yet acted upon. It is non-committal, meaning that there is no way in HTTP to later send an asynchronous response indicating the outcome of processing the request.