question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Not able to connect to ACTION SERVER

See original GitHub issue

I have created actions.py file in the same folder where all my other files - domain.yml, policies.yml etc are located. But while running the bot I’m encountering the following error: 2019-06-27 16:38:33 ERROR rasa_core.actions.action - Failed to run custom action 'Repayment_form'. Couldn't connect to the server at 'http://0.0.0.0:5055'. Is the server running? Error: HTTPConnectionPool(host='0.0.0.0', port=5055): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x000001CCCF4CEDA0>: Failed to establish a new connection: [WinError 10049] The requested address is not valid in its context')) 2019-06-27 16:38:33 ERROR rasa_core.processor - Encountered an exception while running action 'Repayment_form'. Bot will continue, but the actions events are lost. Make sure to fix the exception in your custom code. This is my domain file: domain_bot_action.txt This is my stories file stories_bot_action.txt My actions.py file looks like this. `from typing import Dict, Text, Any, List, Union, Optional from rasa_sdk import Tracker from rasa_sdk.executor import CollectingDispatcher from rasa_sdk.forms import FormAction

 class RepaymentForm(FormAction):
     def name(self) -> Text:
         return "Repayment_form"

     def required_slots(tracker: Tracker) -> List[Text]:
         return ["sub_class"]

     def slot_mappings(self) -> Dict[Text, Union[Dict, List[Dict]]]:
         return {"sub_class": [self.from_text()],}

     def db() -> List[Text]:
         return ['pre-close','pre-closure','preclose','preclosure', 'pre close', 'no' , 'loan repayment 
 methods', 'repay loan methods', 'interest rate', 'interest']

     def validate_sub_class( self, value: Text, dispatcher: CollectingDispatcher, tracker: Tracker, 
 domain: Dict[Text, Any],) -> Optional[Text]:
         if value.lower() in self.db:
             return {"sub_class" : value}
    
         else:
             dispatcher.utter_template("utter_wrong_format", tracker)
             return {"sub_class": None}

     def submit(self,dispatcher: CollectingDispatcher,tracker: Tracker, domain: Dict[Text, Any],) - 
> List[Dict]:
    """Define what the form has to do
        after all required slots are filled"""
    # utter submit template
         dispatcher.utter_template("utter_submit", tracker)
         return []`

This is how the bot has responded to other inputs. It’s successfully running but it fails as soon as it has to perform any custom action image

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:19 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
mm-nasrcommented, Jun 27, 2019

What about your endpoints.yml? Make sure that you uncomment the following lines:

action_endpoint:
 url: "http://localhost:5055/webhook"

Also, you did not mention if you made sure to run the action server by rasa run actions

0reactions
rgstephenscommented, Apr 13, 2022

@Shivappa This isn’t a Rasa bug. You could post it on the Rasa forum or an Azure forum.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Rasa won't connect to action server
Hi, I am using the new rasa docker container. I have to create my own rasa image as there are no official versions...
Read more >
[actionlib] Problems when try to connect client <=> server
In my case the reason is quite simple: stucking at that point my code is not able to publish the transformation odom =>...
Read more >
Rasa Docker: Couldn't connect to the action server but it is ...
Rasa Docker: Couldn't connect to the action server but it is running - Stack Overflow. Stack Overflow for Teams – Start collaborating and ......
Read more >
Wait for action server to start - MATLAB waitForServer
Wait for the action client to connect to the server. waitForServer(actClient);. The fibonacci action will calculate the fibonacci sequence for a given order ......
Read more >
Sharing data through an action hub | Looker - Google Cloud
Build and publish a custom action to a private action hub server for private use. Once the action is added to the action...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found