Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not find the input entity for PeerChannel #94

Closed
lxxzhufu opened this issue Aug 12, 2022 · 4 comments
Closed

Could not find the input entity for PeerChannel #94

lxxzhufu opened this issue Aug 12, 2022 · 4 comments

Comments

@lxxzhufu
Copy link

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
Copy link
Owner

alfem commented Aug 16, 2022

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

@lxxzhufu
Copy link
Author

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
Copy link
Owner

alfem commented Aug 20, 2022

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

@lxxzhufu
Copy link
Author

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

@alfem alfem closed this as completed Oct 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants