# Telegram channel get error

**URL:** <https://forum.rasa.com/t/telegram-channel-get-error/39999>\
**Category:** Rasa Open Source\
**Created:** [February 9, 2021, 9:37am UTC](https://forum.rasa.com/t/telegram-channel-get-error/39999 "2021-02-09T09:37:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mingchi21](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/mingchi21/32/13097_2.png) [@mingchi21](https://forum.rasa.com/u/mingchi21)\
**Post date:** [February 9, 2021, 9:37am UTC](https://forum.rasa.com/t/telegram-channel-get-error/39999/1 "2021-02-09T09:37:57Z")

</div>

Hi dear sir I just get an error from telegram channel, any idea? thanks

Traceback (most recent call last): File “/opt/venv/lib/python3.7/site-packages/sanic/app.py”, line 973, in handle\_request response = await response File “/opt/venv/lib/python3.7/site-packages/rasa/core/channels/telegram.py”, line 218, in message if self.\_is\_user\_message(msg): File “/opt/venv/lib/python3.7/site-packages/rasa/core/channels/telegram.py”, line 177, in \_is\_user\_message return message.text is not None AttributeError: ‘NoneType’ object has no attribute ‘text’

---

<div class="post-metadata">

**Author:** ![desmarchris](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/desmarchris/32/12277_2.png) [@desmarchris](https://forum.rasa.com/u/desmarchris)\
**Post date:** [February 9, 2021, 2:27pm UTC](https://forum.rasa.com/t/telegram-channel-get-error/39999/2 "2021-02-09T14:27:31Z")

</div>

Hi @mingchi21, can you provide some more context around the error?

- What version of rasa are you running?
- are you using Rasa X?
- does this error come on specific messages or a specific command?

Thanks!

---

<div class="post-metadata">

**Author:** ![mingchi21](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/mingchi21/32/13097_2.png) [@mingchi21](https://forum.rasa.com/u/mingchi21)\
**Post date:** [February 16, 2021, 2:43pm UTC](https://forum.rasa.com/t/telegram-channel-get-error/39999/3 "2021-02-16T14:43:50Z")

</div>

Hi

1. I am running Rasa 2.2.2
2. Yes I am using Rasa X

And I just check the code at

```
File "/opt/venv/lib/python3.7/site-packages/rasa/core/channels/telegram.py", 

                    msg = update.message <-- msg could be None here !!
                    if self._is_user_message(msg):
                       text = msg.text.replace("/bot", "")
                    elif self._is_location(msg):
                        text = '{{"lng":{0}, "lat":{1}}}'.format(
                            msg.location.longitude, msg.location.latitude
                        )
                    else:
                        return response.text("success")

```

According to telegram bot api, the update.message is option, which means msg could be None, in this case will trigger the exception.

And telegram will resend the message repeatly.

So, I suggest that, here should check the if update.message == None then just return response.text(“success”)
