# Error on Telegram Bot

**URL:** <https://forum.delta.chat/t/error-on-telegram-bot/2652>\
**Category:** Bots\
**Created:** [July 20, 2023, 2:35pm UTC](https://forum.delta.chat/t/error-on-telegram-bot/2652 "2023-07-20T14:35:24Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Axe](https://forum.delta.chat/user_avatar/forum.delta.chat/axe/32/1527_2.png) [@Axe](https://forum.delta.chat/u/Axe)\
**Post date:** [July 20, 2023, 2:35pm UTC](https://forum.delta.chat/t/error-on-telegram-bot/2652/1 "2023-07-20T14:35:25Z")

</div>

Hello all. I finally figured out how to set up my own bot. It works for a burst of messages and then stops. This is what I’m seeing: Can anybody tell me what to look for or how to fix this?

(.venvs) nonsudo@debian-deltabot:~$ simplebot -a [1234@1234.com](mailto:1234@1234.com) serve  
2023-07-20 09:25:46,288 - simplebot - INFO - bot listening at: [1234@1234.com](mailto:1234@1234.com)  
2023-07-20 09:25:51,682 - simplebot - ERROR - Could not find the input entity for PeerChannel(channel\_id=1329205465) (PeerChannel). Please read [Entities — Telethon 1.28.5 documentation](https://docs.telethon.dev/en/stable/concepts/entities.html) to find out more details.  
Traceback (most recent call last):  
File “/home/nonsudo/.venvs/lib/python3.9/site-packages/simplebot\_tgchan/ **init**.py”, line 197, in check\_channels  
await check\_channel(bot, client, chan)  
File “/home/nonsudo/.venvs/lib/python3.9/site-packages/simplebot\_tgchan/ **init**.py”, line 206, in check\_channel  
channel = await client.get\_entity(PeerChannel(dbchan.id))  
File “/home/nonsudo/.venvs/lib/python3.9/site-packages/telethon/client/users.py”, line 287, in get\_entity  
inputs.append(await self.get\_input\_entity(x))  
File “/home/nonsudo/.venvs/lib/python3.9/site-packages/telethon/client/users.py”, line 461, in get\_input\_entity  
raise ValueError(  
ValueError: Could not find the input entity for PeerChannel(channel\_id=1329205465) (PeerChannel). Please read [Entities — Telethon 1.28.5 documentation](https://docs.telethon.dev/en/stable/concepts/entities.html) to find out more details.  
2023-07-20 09:30:52,282 - simplebot - ERROR - Could not find the input entity for PeerChannel(channel\_id=1329205465) (PeerChannel). Please read [Entities — Telethon 1.28.5 documentation](https://docs.telethon.dev/en/stable/concepts/entities.html) to find out more details.  
Traceback (most recent call last):  
File “/home/nonsudo/.venvs/lib/python3.9/site-packages/simplebot\_tgchan/ **init**.py”, line 197, in check\_channels  
await check\_channel(bot, client, chan)  
File “/home/nonsudo/.venvs/lib/python3.9/site-packages/simplebot\_tgchan/ **init**.py”, line 206, in check\_channel  
channel = await client.get\_entity(PeerChannel(dbchan.id))  
File “/home/nonsudo/.venvs/lib/python3.9/site-packages/telethon/client/users.py”, line 287, in get\_entity  
inputs.append(await self.get\_input\_entity(x))  
File “/home/nonsudo/.venvs/lib/python3.9/site-packages/telethon/client/users.py”, line 461, in get\_input\_entity  
raise ValueError(  
ValueError: Could not find the input entity for PeerChannel(channel\_id=1329205465) (PeerChannel). Please read [Entities — Telethon 1.28.5 documentation](https://docs.telethon.dev/en/stable/concepts/entities.html) to find out more details.

---

<div class="post-metadata">

**Author:** ![Simon](https://forum.delta.chat/user_avatar/forum.delta.chat/simon/32/287_2.png) [@Simon](https://forum.delta.chat/u/Simon)\
**Post date:** [July 21, 2023, 1:48am UTC](https://forum.delta.chat/t/error-on-telegram-bot/2652/2 "2023-07-21T01:48:39Z")

</div>

> [@Axe](#):
>
> ValueError: Could not find the input entity for PeerChannel(channel\_id=1329205465) (PeerChannel). Please read [Entities — Telethon 1.28.5 documentation](https://docs.telethon.dev/en/stable/concepts/entities.html) to find out more details.

“Telethon” seems to be the telegram library and it complains about not finding an entity, maybe your thing was blocked by telegram? I just have this wild guess for now.

---

<div class="post-metadata">

**Author:** ![Axe](https://forum.delta.chat/user_avatar/forum.delta.chat/axe/32/1527_2.png) [@Axe](https://forum.delta.chat/u/Axe)\
**Post date:** [July 21, 2023, 3:07pm UTC](https://forum.delta.chat/t/error-on-telegram-bot/2652/3 "2023-07-21T15:07:08Z")

</div>

So far I have not sorted out that error, but I did figure out why my Bot kept shutting down:

I created my bot on a VPS running on my sons server here in my house. I used SSH (Putty on Windows) to set it up. Every time I closed SSH, it would kill my bot. I literally had to keep the SSH instance open to keep the bot running. My son opened the console in ProxMox and ran the commands there which keeps the bot running now.

The errors are still there, but the bot runs properly now. So I’m still not sure how to get rid of them.

---

<div class="post-metadata">

**Author:** ![adbenitez](https://forum.delta.chat/user_avatar/forum.delta.chat/adbenitez/32/2323_2.png) [@adbenitez](https://forum.delta.chat/u/adbenitez)\
**Post date:** [July 23, 2023, 9:18pm UTC](https://forum.delta.chat/t/error-on-telegram-bot/2652/4 "2023-07-23T21:18:37Z")

</div>

you can also use tmux or screen (terminal multiplexers) to keep the session open even if you disconnect from ssh. I personally use tmux at the moment, the first time you run:

`tmux`

then there you can run several bots creating “tabs” with one new terminal/shell session, you can use `ctrl+b c` to create a new tab, `ctrl+b n` to switch to the next tab etc.

then on re-connection run `tmux a` to attach the previous created “window” with all your tabs/shell sessions and their still running commands

---

<div class="post-metadata">

**Author:** ![adbenitez](https://forum.delta.chat/user_avatar/forum.delta.chat/adbenitez/32/2323_2.png) [@adbenitez](https://forum.delta.chat/u/adbenitez)\
**Post date:** [July 23, 2023, 9:23pm UTC](https://forum.delta.chat/t/error-on-telegram-bot/2652/5 "2023-07-23T21:23:15Z")

</div>

tip: when pasting logs it is better to use a three ``` at the start and end of the block, ex:

```auto
text containing **raw** __stuff__.py

```

---

<div class="post-metadata">

**Author:** ![adbenitez](https://forum.delta.chat/user_avatar/forum.delta.chat/adbenitez/32/2323_2.png) [@adbenitez](https://forum.delta.chat/u/adbenitez)\
**Post date:** [July 23, 2023, 10:04pm UTC](https://forum.delta.chat/t/error-on-telegram-bot/2652/6 "2023-07-23T22:04:33Z")

</div>

about the error you are having with simplebot\_tgchan, it seems you left the channel with the account the bot is using? or otherwise the channel got removed or you got removed? is the channel not public?

---

<div class="post-metadata">

**Author:** ![Axe](https://forum.delta.chat/user_avatar/forum.delta.chat/axe/32/1527_2.png) [@Axe](https://forum.delta.chat/u/Axe)\
**Post date:** [July 24, 2023, 5:09am UTC](https://forum.delta.chat/t/error-on-telegram-bot/2652/7 "2023-07-24T05:09:47Z")

</div>

I don’t know. I can’t figure out what channel it is. When I try to open it in Telegram Web it does not give me anything. Maybe I’ll try with my wife’s telegram account and see if it comes up. Maybe I’m blocked somehow?

---

<div class="post-metadata">

**Author:** ![r10s](https://forum.delta.chat/user_avatar/forum.delta.chat/r10s/32/1513_2.png) [@r10s](https://forum.delta.chat/u/r10s)\
**Post date:** [October 6, 2026, 3:11pm UTC](https://forum.delta.chat/t/error-on-telegram-bot/2652/8 "2026-10-06T15:11:23Z")

</div>


