Yes i am using tracker.latest_message.text in my custom action but some times i am facing with following error :
Traceback (most recent call last):
File “/u01/app/anaconda3/envs/rasa/lib/python3.6/site-packages/rasa/core/actions/action.py”, line 397, in run
json=json_body, method=“post”, timeout=DEFAULT_REQUEST_TIMEOUT
File “/u01/app/anaconda3/envs/rasa/lib/python3.6/asyncio/coroutines.py”, line 110, in next
return self.gen.send(None)
File “/u01/app/anaconda3/envs/rasa/lib/python3.6/site-packages/rasa/utils/endpoints.py”, line 142, in request
resp.status, resp.reason, await resp.content.read()
rasa.utils.endpoints.ClientResponseError: 500, INTERNAL SERVER ERROR, body=‘b’\n500 Internal Server Error\n
Internal Server Error
\n
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.
\n’’
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File “/u01/app/anaconda3/envs/rasa/lib/python3.6/site-packages/rasa/core/processor.py”, line 439, in _run_action
events = await action.run(output_channel, nlg, tracker, self.domain)
File “/u01/app/anaconda3/envs/rasa/lib/python3.6/asyncio/coroutines.py”, line 110, in next
return self.gen.send(None)
File “/u01/app/anaconda3/envs/rasa/lib/python3.6/site-packages/rasa/core/actions/action.py”, line 419, in run
core:
File “/u01/app/anaconda3/envs/rasa/lib/python3.6/site-packages/flask/app.py”, line 2292, in wsgi_app
response = self.full_dispatch_request()
File “/u01/app/anaconda3/envs/rasa/lib/python3.6/site-packages/flask/app.py”, line 1815, in full_dispatch_request
rv = self.handle_user_exception(e)
File “/u01/app/anaconda3/envs/rasa/lib/python3.6/site-packages/flask_cors/extension.py”, line 161, in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
File “/u01/app/anaconda3/envs/rasa/lib/python3.6/site-packages/flask/app.py”, line 1718, in handle_user_exception
reraise(exc_type, exc_value, tb)
File “/u01/app/anaconda3/envs/rasa/lib/python3.6/site-packages/flask/_compat.py”, line 35, in reraise
raise value
File “/u01/app/anaconda3/envs/rasa/lib/python3.6/site-packages/flask/app.py”, line 1813, in full_dispatch_request
rv = self.dispatch_request()
File “/u01/app/anaconda3/envs/rasa/lib/python3.6/site-packages/flask/app.py”, line 1799, in dispatch_request
return self.view_functionsrule.endpoint
File “/u01/app/anaconda3/envs/rasa/lib/python3.6/site-packages/flask_cors/decorator.py”, line 128, in wrapped_function
resp = make_response(f(*args, **kwargs))
File “/u01/app/anaconda3/envs/rasa/lib/python3.6/site-packages/rasa_sdk/endpoint.py”, line 59, in webhook
response = executor.run(action_call)
File “/u01/app/anaconda3/envs/rasa/lib/python3.6/site-packages/rasa_sdk/executor.py”, line 237, in run
“No registered Action found for name ‘{}’.”.format(action_name)
Exception: No registered Action found for name ‘action_custom_fallback’.
I am of opinion that i am getting this error because some times response time is more than 100000 ms if that is the case can you please let me know how to fix it(can i increase waiting time)
The above story is without forms but when i use forms i am not even able to set form action slots also(username and password) below is a story and actions.py
story:
Make_Payment_with_Login
- utter_message_login_credentials
- utter_yes_no_buttons
- user_login_form
- form{“name”: “user_login_form”}
- form{“name”:“null”}
- action_outstanding_amount_preprocess
- action_outstanding_amount
- utter_payment_message
- utter_yes_no_buttons
program:
import logging
import requests
import json
from rasa_sdk import Action
from rasa_sdk.events import SlotSet
from rasa_sdk.events import Restarted
from rasa_sdk.events import UserUtteranceReverted
from rasa_sdk.events import UserUttered
from rasa_sdk.forms import FormAction
from rasa_sdk import Tracker
from rasa_sdk.executor import CollectingDispatcher
from typing import Dict, Text, Any, List, Union, Optional
logger = logging.getLogger(name)
#Form action logic
class UserLoginForm(FormAction):
“”“Example of a custom form action”""
def name(self):
"""Unique identifier of the form"""
return "user_login_form"
@staticmethod
def required_slots(tracker: Tracker) -> List[Text]:
"""A list of required slots that the form has to fill"""
print("required slots")
return ["user_id","password"]
def slot_mappings(self):
# type: () -> Dict[Text: Union[Dict, List[Dict]]]
"""A dictionary to map required slots to
- an extracted entity
- intent: value pairs
- a whole message
or a list of them, where a first match will be picked"""
print("user_id",user_id)
print("password",password)
return {"user_id": [self.from_text()],"password": [self.from_text()]}
def submit(self):
"""Define what the form has to do
after all required slots are filled"""
dispatcher.utter_template("utter_submit", tracker)
return []
can you please let me know what is the reason and solution for this mentioned error