# \[Solved\]Custom action throwing an exception

**URL:** <https://forum.rasa.com/t/solved-custom-action-throwing-an-exception/1319>\
**Category:** Rasa Open Source\
**Created:** [September 22, 2018, 7:10am UTC](https://forum.rasa.com/t/solved-custom-action-throwing-an-exception/1319 "2018-09-22T07:10:57Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Abir](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/abir/32/771_2.png) [@Abir](https://forum.rasa.com/u/Abir)\
**Post date:** [September 22, 2018, 7:10am UTC](https://forum.rasa.com/t/solved-custom-action-throwing-an-exception/1319/1 "2018-09-22T07:10:57Z")

</div>

![bot_error](http://forum.rasa.com/images/transparent.png)

@ahson@akelad@Juste

So i am facing this issue and i have added endpoints.yml as follows :

action\_endpoint: url: [http://localhost:5055/webhook](http://localhost:5055/webhook)

I tried @ahson 's solution by updating endpoints.yml as follows :

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

`core_endpoint: url: http://localhost:5005`

Still no luck ☹

Anyone facing such issue ?

---

<div class="post-metadata">

**Author:** ![ahson](https://avatars.discourse-cdn.com/v4/letter/a/ea666f/32.png) [@ahson](https://forum.rasa.com/u/ahson)\
**Post date:** [September 23, 2018, 10:29pm UTC](https://forum.rasa.com/t/solved-custom-action-throwing-an-exception/1319/2 "2018-09-23T22:29:53Z")

</div>

What does your endpoint.yml look like

---

<div class="post-metadata">

**Author:** ![ahson](https://avatars.discourse-cdn.com/v4/letter/a/ea666f/32.png) [@ahson](https://forum.rasa.com/u/ahson)\
**Post date:** [September 23, 2018, 10:30pm UTC](https://forum.rasa.com/t/solved-custom-action-throwing-an-exception/1319/3 "2018-09-23T22:30:37Z")

</div>

Also what command are you using to

A. run the action server

b. run rasa core

---

<div class="post-metadata">

**Author:** ![ahson](https://avatars.discourse-cdn.com/v4/letter/a/ea666f/32.png) [@ahson](https://forum.rasa.com/u/ahson)\
**Post date:** [September 23, 2018, 10:32pm UTC](https://forum.rasa.com/t/solved-custom-action-throwing-an-exception/1319/4 "2018-09-23T22:32:24Z")

</div>

You need to run both at the same time;

Check out the makefile in the moodbot example;

> <https://github.com/RasaHQ/rasa_core_sdk/blob/master/examples/moodbot/Makefile>

---

<div class="post-metadata">

**Author:** ![Abir](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/abir/32/771_2.png) [@Abir](https://forum.rasa.com/u/Abir)\
**Post date:** [September 25, 2018, 1:12pm UTC](https://forum.rasa.com/t/solved-custom-action-throwing-an-exception/1319/5 "2018-09-25T13:12:04Z")

</div>

Thanks man , i had to add ‘endpontconfig’ which was missing . it’s solved 🙂

---

<div class="post-metadata">

**Author:** ![Nilesh](https://avatars.discourse-cdn.com/v4/letter/n/f475e1/32.png) [@Nilesh](https://forum.rasa.com/u/Nilesh)\
**Post date:** [October 31, 2018, 10:13am UTC](https://forum.rasa.com/t/solved-custom-action-throwing-an-exception/1319/6 "2018-10-31T10:13:53Z")

</div>

can you please tell me how to pass --endpoint flag interactive learning

---

<div class="post-metadata">

**Author:** ![Abir](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/abir/32/771_2.png) [@Abir](https://forum.rasa.com/u/Abir)\
**Post date:** [October 31, 2018, 1:36pm UTC](https://forum.rasa.com/t/solved-custom-action-throwing-an-exception/1319/7 "2018-10-31T13:36:06Z")

</div>

from rasa\_core.agent import Agent

from rasa\_core.train import online

from rasa\_core.utils import EndpointConfig

endpoint = EndpointConfig(url=“[http://localhost:5055/webhook](http://localhost:5055/webhook)”)

agent = Agent(“Add the usual parameters”, action\_endpoint = endpoint )

data = agent.load\_data(training\_data\_file)

agent.train(“usual parameters”)

online.serve\_agent(agent)

Hope this serves your purpose 🙂

---

<div class="post-metadata">

**Author:** ![agrima\_agarwal](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/agrima_agarwal/32/124_2.png) [@agrima\_agarwal](https://forum.rasa.com/u/agrima_agarwal)\
**Post date:** [November 2, 2018, 6:35am UTC](https://forum.rasa.com/t/solved-custom-action-throwing-an-exception/1319/8 "2018-11-02T06:35:32Z")

</div>

Hi Abir,

I am currently running : python -m rasa\_core\_sdk.endpoint --actions actions in parallel to another prompt in which I am training my bot.

While doing this when I am calling custom action, it is throwing error

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/1X/4d657abe63d16908bbc02bf0f7bc0f9452dd8a7f.png)

Can you please help.

---

<div class="post-metadata">

**Author:** ![Abir](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/abir/32/771_2.png) [@Abir](https://forum.rasa.com/u/Abir)\
**Post date:** [November 3, 2018, 7:29am UTC](https://forum.rasa.com/t/solved-custom-action-throwing-an-exception/1319/9 "2018-11-03T07:29:36Z")

</div>

make sure to correctly configure endpoint , Since the error code is 5xx it means custom action server is creating some problems . Otherwise , there could be some proxy issue

---

<div class="post-metadata">

**Author:** ![agrima\_agarwal](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/agrima_agarwal/32/124_2.png) [@agrima\_agarwal](https://forum.rasa.com/u/agrima_agarwal)\
**Post date:** [November 3, 2018, 9:24am UTC](https://forum.rasa.com/t/solved-custom-action-throwing-an-exception/1319/10 "2018-11-03T09:24:57Z")

</div>

Hi Abir,

My endpoint.yml file is - action\_endpoint: url: “[http://localhost:5055/webhook](http://localhost:5055/webhook)” core\_endpoint: url: “[http://localhost:5055](http://localhost:5055)”

Then also it is throwing 500 error.

---

<div class="post-metadata">

**Author:** ![Abir](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/abir/32/771_2.png) [@Abir](https://forum.rasa.com/u/Abir)\
**Post date:** [November 3, 2018, 12:01pm UTC](https://forum.rasa.com/t/solved-custom-action-throwing-an-exception/1319/11 "2018-11-03T12:01:15Z")

</div>

nlu\_interpreter = RasaNLUInterpreter(\<nlu\_model\_path\>)

action\_endpoint = EndpointConfig(url=“[http://localhost:5055/webhook](http://localhost:5055/webhook)”)

agent = Agent.load(\<dialogue\_model\_path\>, interpreter = nlu\_interpreter, action\_endpoint = action\_endpoint)

agent.handle\_message()

Use the above to run bot and drop core\_endpoint config that’s not necessary

---

<div class="post-metadata">

**Author:** ![agrima\_agarwal](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/agrima_agarwal/32/124_2.png) [@agrima\_agarwal](https://forum.rasa.com/u/agrima_agarwal)\
**Post date:** [November 6, 2018, 9:26pm UTC](https://forum.rasa.com/t/solved-custom-action-throwing-an-exception/1319/12 "2018-11-06T21:26:36Z")

</div>

It is working now.

Thanks for your help

---

<div class="post-metadata">

**Author:** ![agrima\_agarwal](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/agrima_agarwal/32/124_2.png) [@agrima\_agarwal](https://forum.rasa.com/u/agrima_agarwal)\
**Post date:** [November 13, 2018, 10:25am UTC](https://forum.rasa.com/t/solved-custom-action-throwing-an-exception/1319/13 "2018-11-13T10:25:21Z")

</div>

Hi Abir,

I am currently training my bot and updating stories.md file using training online method.

Currently I am facing issue that bot is not able to identify brand as entity but all other entities it is identifying i.e. gender,color,product etc.

Can you please help on this.

---

<div class="post-metadata">

**Author:** ![Abir](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/abir/32/771_2.png) [@Abir](https://forum.rasa.com/u/Abir)\
**Post date:** [November 29, 2018, 6:30am UTC](https://forum.rasa.com/t/solved-custom-action-throwing-an-exception/1319/14 "2018-11-29T06:30:01Z")

</div>

Entity recognition will take more data as compared to intent classification.Just keep adding more data of a particular example type

---

<div class="post-metadata">

**Author:** ![navod](https://avatars.discourse-cdn.com/v4/letter/n/977dab/32.png) [@navod](https://forum.rasa.com/u/navod)\
**Post date:** [April 3, 2020, 3:01pm UTC](https://forum.rasa.com/t/solved-custom-action-throwing-an-exception/1319/15 "2020-04-03T15:01:30Z")

</div>

Can you please tell me which file i need to change? and how?
