HTTP error after user message

Hi,

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:

    action_endpoint:
      url: http://localhost:5055/webhook
    
  • The command to run the bot in command line looks like this:

    python -m rasa_core.run -d models/dlg -u models/nlu/default/model_20000101-000000 --endpoints endpoints.yml
    
  • In parralel, I started the action server by using the command:

    python -m rasa_core_sdk.endpoint --actions actions
    

    The output is:

    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.

Thank you very much,

Anthony

Sorry to bump my thread, but any advice on this? Even the Rasa Core quickstart project doesn’t work anymore with Rasa 0.11.2. Thanks

What exactly doesn’t work with the quickstart project?

Thank you for your answer. I have exactly the same error with the quickstart project:

requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: http://localhost:5005/webhooks/rest/webhook?stream=true&token=

I don’t even plug the NLU part - the error appears when running the python -m rasa_core.run -d models/dialogue command.

I can confirm that I don’t have this problem with Rasa 0.10.4 using the very same quickstart project.

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…

Thanks

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 :smiley:)

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.

same problem with me on version 11.4 while applying interactive learning

Hi @ashukrishna100, I created a GitHub issue here if you want to chime in. In particular, could you try this?

Thanks

@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.

3 Likes

Thank you so much, I had this problem for a while with Rasa 0.11 and removing http_proxy did the trick!

3 Likes

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.