Encountered an exception while running action 'action_submit'.Bot will continue, but the actions events are lost. Please check the logs of your action server for more information

I’m getting many exceptions while using custom actions
Exceptions are:

 Encountered an exception while running action 'action_submit'.Bot will continue, but the actions events are lost.
 Please check the logs of your action server for more information.
Traceback (most recent call last):
  File "c:\users\samra.arif\pycharmprojects\pythonproject1\venv\lib\site-packages\rasa\core\actions\action.py", line 685, in run
    response = await self.action_endpoint.request(
  File "c:\users\samra.arif\pycharmprojects\pythonproject1\venv\lib\site-packages\rasa\utils\endpoints.py", line 154, in request
    raise ClientResponseError(
rasa.utils.endpoints.ClientResponseError: 500, Internal Server Error, body='b'<!DOCTYPE html><html lang=en><meta charset=UTF-8><title>\xe2\x9a\xa0\xef\xb8\x8f 500 \x
e2\x80\x94 Internal Server Error</title>\n<style>\n        html { font-family: sans-serif }\n        h2 { color: #888; }\n        .tb-wrapper p { margin: 0 }\n
  .frame-border { margin: 1rem }\n        .frame-line > * { padding: 0.3rem 0.6rem }\n        .frame-line { margin-bottom: 0.3rem }\n        .frame-code { font-size:
 16px; padding-left: 4ch }\n        .tb-wrapper { border: 1px solid #eee }\n        .tb-header { background: #eee; padding: 0.3rem; font-weight: bold }\n        .fra
me-descriptor { background: #e2eafb; font-size: 14px }\n    </style>\n<h1>\xe2\x9a\xa0\xef\xb8\x8f 500 \xe2\x80\x94 Internal Server Error</h1><p>The server encounter
ed an internal error and cannot complete your request.\n''

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "c:\users\samra.arif\pycharmprojects\pythonproject1\venv\lib\site-packages\rasa\core\processor.py", line 772, in _run_action
    events = await action.run(
  File "c:\users\samra.arif\pycharmprojects\pythonproject1\venv\lib\site-packages\rasa\core\actions\action.py", line 709, in run
    raise RasaException("Failed to execute custom action.") from e
rasa.shared.exceptions.RasaException: Failed to execute custom action.

Please check the logs of the Action Server as the error suggested. Are you using Rasa locally or on a server?

idk about logs. but I uncommented the endpoint and am running rasa locally

The logs are what’s written in the terminal where you ran rasa run actions

ohhhh, there’s also exception here when i run rasa run actions

Exception occurred while handling uri: 'http://localhost:5055/webhook'
Traceback (most recent call last):
  File "c:\users\samra.arif\pycharmprojects\pythonproject1\venv\lib\site-packages\sanic\app.py", line 931, in handle_request
    response = await response
  File "c:\users\samra.arif\pycharmprojects\pythonproject1\venv\lib\site-packages\rasa_sdk\endpoint.py", line 104, in webhook
    result = await executor.run(action_call)
  File "c:\users\samra.arif\pycharmprojects\pythonproject1\venv\lib\site-packages\rasa_sdk\executor.py", line 397, in run
    events = await utils.call_potential_coroutine(
  File "c:\users\samra.arif\pycharmprojects\pythonproject1\venv\lib\site-packages\rasa_sdk\utils.py", line 230, in call_potential_coroutine
    return await coroutine_or_return_value
  File "C:\Users\Samra.Arif\PycharmProjects\pythonProject1\actions\actions.py", line 45, in run
AttributeError: 'Tracker' object has no attribute 'getslot'

Here it is. The function’s name is get_slot not getslot.

here at this function na???


i updated this code


Can u guide me what’s the key argument now?

TypeError: get_slot() missing 1 required positional argument: ‘key’

It’s tracker not Tracker

yeah i changed it. Just got done with other errors. but my code is not going on try part its showing error msg placed in exception

        s.login(fromaddr, "mypassword")

        # Converts the Multipart msg into a string
        text = msg.as_string()

        # sending the mail
        s.sendmail(fromaddr, toaddr, text)
        print("An Error occured while sending email.")

here’s the output of rasa run actions

An Error occured while sending email.

To see the error, change to:

except Exception as e:
    print("An Error occured while sending email:\n" + str(e))

my username and pw is correct

An Error occured while sending email.(535, b'5.7.8 Username and Password not accepted. Learn more at\n5.7.8  https://support.google.com/mail/?p=BadCredentials l25sm1
605222wrb.44 - gsmtp')

At this point it’s not an error related to Rasa, but to the email module you are using.

Please post your question on StackOverflow or other general coding forums, since I don’t have experience with this module and cannot test now.

But from what is written in the error,

Thankyou soo much u helped alot. It got resolved as i wasn’t using gmail account. Replaced my email with gmail account. And turned on less secure app option in google account.

1 Like

Glad to know! :slight_smile:

Please mark the message that helped you as solution to close the thread :slight_smile:

1 Like

Is the code you were working on to send an email via Rasa. If yes, please share the code with me because I want to implement it and I faced difficulties and I am a beginner with Rasa. Thanks