# Custom Componenet

**URL:** <https://forum.rasa.com/t/custom-componenet/46859>\
**Category:** Rasa Open Source\
**Created:** [August 13, 2021, 2:42pm UTC](https://forum.rasa.com/t/custom-componenet/46859 "2021-08-13T14:42:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![abhi](https://avatars.discourse-cdn.com/v4/letter/a/b487fb/32.png) [@abhi](https://forum.rasa.com/u/abhi)\
**Post date:** [August 13, 2021, 2:42pm UTC](https://forum.rasa.com/t/custom-componenet/46859/1 "2021-08-13T14:42:37Z")

</div>

Hello!

In the process method of the custom component, I am running into an issue as far as the message object goes. I am attempting to use the tokens from the message parameter but I am running into an error where `message.get('tokens')` is returning None.

This is the error I receive during training:

```
message_tokens = [t.get('text') for t in message.get('tokens')]

TypeError: 'NoneType' object is not iterable`

```

This is my process method where the issue is happening in the custom component py file:

```
def process(self, message: Message, **kwargs: Any) -> None:
    message_tokens = [t.get('text') for t in message.get('tokens')]

```

Let me know if I can provide any extra details!

Thanks! Abhi

---

<div class="post-metadata">

**Author:** ![Dustyposa](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/dustyposa/32/13745_2.png) [@Dustyposa](https://forum.rasa.com/u/Dustyposa)\
**Post date:** [August 16, 2021, 2:50am UTC](https://forum.rasa.com/t/custom-componenet/46859/2 "2021-08-16T02:50:15Z")

</div>

Did you set a `attribute` named `token` ?

---

<div class="post-metadata">

**Author:** ![minlik](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/minlik/32/17401_2.png) [@minlik](https://forum.rasa.com/u/minlik)\
**Post date:** [October 3, 2021, 12:30pm UTC](https://forum.rasa.com/t/custom-componenet/46859/3 "2021-10-03T12:30:28Z")

</div>

The same issue. Have you ever solved this?
