# Action server error

**URL:** <https://forum.rasa.com/t/action-server-error/49875>\
**Category:** Rasa Open Source\
**Created:** [December 9, 2021, 9:43am UTC](https://forum.rasa.com/t/action-server-error/49875 "2021-12-09T09:43:13Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Priya123](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/priya123/32/18838_2.png) [@Priya123](https://forum.rasa.com/u/Priya123)\
**Post date:** [December 9, 2021, 9:43am UTC](https://forum.rasa.com/t/action-server-error/49875/1 "2021-12-09T09:43:13Z")

</div>

Hello,

I am receiving the below error while talking with the bot. This error is occuring after series of interactions with the bot. May I know, how to solve it?

```auto
ERROR: rasa.core.processor - Encountered an exception while running action 'action_calculate_financial_knowledge_score'.
Bot will continue, but the actions events are lost.
Please check the logs of your action server for more information.
```

---

<div class="post-metadata">

**Author:** ![ChrisRahme](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/chrisrahme/32/15572_2.png) [@ChrisRahme](https://forum.rasa.com/u/ChrisRahme)\
**Post date:** [December 10, 2021, 7:17am UTC](https://forum.rasa.com/t/action-server-error/49875/2 "2021-12-10T07:17:57Z")

</div>

> [@Priya123](#):
>
> `Please check the logs of your action server for more information.`

As the error recommends, please check the logs in the terminal in which you ran `rasa run actions` and share your action.

---

<div class="post-metadata">

**Author:** ![Priya123](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/priya123/32/18838_2.png) [@Priya123](https://forum.rasa.com/u/Priya123)\
**Post date:** [December 12, 2021, 2:03pm UTC](https://forum.rasa.com/t/action-server-error/49875/3 "2021-12-12T14:03:28Z")

</div>

> [@ChrisRahme](#):
>
> rasa run actions

Hi Chris, Thanks for your reply. I ran rasa run actions and got the below.

```auto
2021-12-12 15:00:06 INFO rasa_sdk.endpoint - Starting action endpoint server...
2021-12-12 15:00:07 INFO rasa_sdk.executor - Registered function for 'action_session_start'.
2021-12-12 15:00:07 INFO rasa_sdk.executor - Registered function for 'action_restart'.
2021-12-12 15:00:07 INFO rasa_sdk.executor - Registered function for 'action_explain_welcome_form'.
2021-12-12 15:00:07 INFO rasa_sdk.executor - Registered function for 'action_calculate_subjective_financial_health_score'.
2021-12-12 15:00:07 INFO rasa_sdk.executor - Registered function for 'action_financial_health_score_feedback'.
2021-12-12 15:00:07 INFO rasa_sdk.executor - Registered function for 'action_get_stock_price'.
2021-12-12 15:00:07 INFO rasa_sdk.executor - Registered function for 'action_calculate_financial_knowledge_score'.
2021-12-12 15:00:07 INFO rasa_sdk.executor - Registered function for 'validate_subjective_financial_health_score_form'.
2021-12-12 15:00:07 INFO rasa_sdk.executor - Registered function for 'validate_financial_knowledge_score_form'.
2021-12-12 15:00:07 INFO rasa_sdk.endpoint - Action endpoint is up and running on http://0.0.0.0:5055

```

Can you please tell me how to fix now?

---

<div class="post-metadata">

**Author:** ![nik202](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/nik202/32/16098_2.png) [@nik202](https://forum.rasa.com/u/nik202)\
**Post date:** [December 12, 2021, 3:15pm UTC](https://forum.rasa.com/t/action-server-error/49875/4 "2021-12-12T15:15:46Z")

</div>

@Priya123 Did you mentioned all the actions in `domain.yml` ? and what error now you seeing while running `rasa shell --debug` and `rasa run actions --debug` when talking to the bot?

Can you even share the `rasa --version` please.

---

<div class="post-metadata">

**Author:** ![Priya123](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/priya123/32/18838_2.png) [@Priya123](https://forum.rasa.com/u/Priya123)\
**Post date:** [December 12, 2021, 4:21pm UTC](https://forum.rasa.com/t/action-server-error/49875/5 "2021-12-12T16:21:40Z")

</div>

Hi , running rasa run actions --port 5056 on a seperate terminal and then running rasa shell on another terminal, I get the following shown in the actions terminal

```auto
Exception occurred while handling uri: 'http://localhost:5056/webhook'
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/sanic/app.py", line 931, in handle_request
    response = await response
  File "/usr/local/lib/python3.7/site-packages/rasa_sdk/endpoint.py", line 104, in webhook
    result = await executor.run(action_call)
  File "/usr/local/lib/python3.7/site-packages/rasa_sdk/executor.py", line 398, in run
    action(dispatcher, tracker, domain)
  File "/usr/local/lib/python3.7/site-packages/rasa_sdk/utils.py", line 230, in call_potential_coroutine
    return await coroutine_or_return_value
  File "/mnt/c/dfavirtual/dfa/chatbot/actions/actions_fhs.py", line 145, in run
    db.save(financial_health_score, SubjectiveFinancialHealthScore)
  File "/mnt/c/dfavirtual/dfa/chatbot/actions/database_utils.py", line 53, in save
    engine = self._create_engine()
  File "/mnt/c/dfavirtual/dfa/chatbot/actions/database_utils.py", line 37, in _create_engine
    url = self._build_db_url()
  File "/mnt/c/dfavirtual/dfa/chatbot/actions/database_utils.py", line 12, in _build_db_url
    db_user = os.environ["DB_USER"]
  File "/usr/local/lib/python3.7/os.py", line 678, in __getitem__
    raise KeyError(key) from None
KeyError: 'DB_USER'
Exception occurred while handling uri: 'http://localhost:5056/webhook'
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/sanic/app.py", line 931, in handle_request
    response = await response
  File "/usr/local/lib/python3.7/site-packages/rasa_sdk/endpoint.py", line 104, in webhook
    result = await executor.run(action_call)
  File "/usr/local/lib/python3.7/site-packages/rasa_sdk/executor.py", line 398, in run
    action(dispatcher, tracker, domain)
  File "/usr/local/lib/python3.7/site-packages/rasa_sdk/utils.py", line 230, in call_potential_coroutine
    return await coroutine_or_return_value
  File "/mnt/c/dfavirtual/dfa/chatbot/actions/actions_fhs.py", line 172, in run
    score = int(tracker.get_slot(self._FHS))
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
```

---

<div class="post-metadata">

**Author:** ![Priya123](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/priya123/32/18838_2.png) [@Priya123](https://forum.rasa.com/u/Priya123)\
**Post date:** [December 12, 2021, 4:22pm UTC](https://forum.rasa.com/t/action-server-error/49875/6 "2021-12-12T16:22:36Z")

</div>

My rasa versions are as below;

```auto
Rasa Version : 2.7.0
Minimum Compatible Version: 2.6.0
Rasa SDK Version : 2.7.0
Rasa X Version : 0.41.1
Python Version : 3.7.0
Operating System : Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid
Python Path : /usr/local/bin/python3.7
```

---

<div class="post-metadata">

**Author:** ![nik202](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/nik202/32/16098_2.png) [@nik202](https://forum.rasa.com/u/nik202)\
**Post date:** [December 12, 2021, 4:26pm UTC](https://forum.rasa.com/t/action-server-error/49875/7 "2021-12-12T16:26:29Z")

</div>

@Priya123 this issue is related to the main issue? can you please briefly explain your use case or project you doing and related files if possible? please use format for the code share.

---

<div class="post-metadata">

**Author:** ![ChrisRahme](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/chrisrahme/32/15572_2.png) [@ChrisRahme](https://forum.rasa.com/u/ChrisRahme)\
**Post date:** [December 12, 2021, 5:30pm UTC](https://forum.rasa.com/t/action-server-error/49875/8 "2021-12-12T17:30:25Z")

</div>

> [@Priya123](#):
>
> ```auto
> score = int(tracker.get_slot(self._FHS))
> TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
> 
> ```

The error is right here. `self._FHS` is `None` and you’re trying to convert it to an integer.

Basic Python will help you solve the issue:

```python
fhs = tracker.get_slot(self._FHS)
score = 0 if fhs is None else int(fhs)

```
