alfem/telegram-download-daemon

Could not find the input entity for PeerChannel

lxxzhufu opened this issue · 4 comments

This seems to be my channel ID problem, but I am the ID I have obtained by my IDBot. I don't know where the problem appeared. I hope to get your answer. The environment Alpine Python3.9

The log is as follows

Traceback (most recent call last):
File "/root/telegram-download-daemon/telegram-download-daemon.py", line 277, in
client.loop.run_until_complete(start())
File "/usr/lib/python3.9/asyncio/base_events.py", line 647, in run_until_complete
return future.result()
File "/root/telegram-download-daemon/telegram-download-daemon.py", line 271, in start
await sendHelloMessage(client, peerChannel)
File "/root/telegram-download-daemon/telegram-download-daemon.py", line 112, in sendHelloMessage
entity = await client.get_entity(peerChannel)
File "/usr/lib/python3.9/site-packages/telethon/client/users.py", line 292, in get_entity
inputs.append(await self.get_input_entity(x))
File "/usr/lib/python3.9/site-packages/telethon/client/users.py", line 466, in get_input_entity
raise ValueError(
ValueError: Could not find the input entity for PeerChannel(channel_id=1452042302) (PeerChannel). Please read https://docs.telethon.dev/en/latest/concepts/entities.html to find out more details.
[ERROR/2022-08-12 16:10:42,101]asyncio:Task was destroyed but it is pending!
task: <Task pending name='Task-10' coro=<worker() running at /root/telegram-download-daemon/telegram-download-daemon.py:228> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x150c166c5ac0>()]>>
[ERROR/2022-08-12 16:10:42,102]asyncio:Task was destroyed but it is pending!
task: <Task pending name='Task-11' coro=<worker() running at /root/telegram-download-daemon/telegram-download-daemon.py:228> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x150c166c5af0>()]>>

alfem commented

Check again your channel id. Perhaps it has got an hyphen at the beginning.

I'm glad to hear from you. But I checked that my channel ID has added the - 100 field before my ID, but the error is still the same. I don't know what to do next

alfem commented

As you can see in the README, check #45, #48 and #73. Perhaps you will find some clues there.

I'm sure my ID is from @ username_ id_ to_ The BOT obtained it, but his error is still like this