alfem/telegram-download-daemon

cant start after reinstall

Closed this issue · 3 comments

Hi! Everything was ok until today, running smoothly and nice, but today it stopped. Something i maybe did wrong is i deleted all messages in the channel and also deleted the channel.
I tried to fix it reinstalling and did it from the very bottom, even reinstalling python.
Now i cant make it work, no way. I've made sure the channel id is correct, but there is no way i can do it.
Thanks and sorry for bothering, i've tried it the last few hours.
Here is the log:

Session loaded from /session/DownloadDaemon.session

Session saved in /session/DownloadDaemon.session

Traceback (most recent call last):

File "./telegram-download-daemon.py", line 278, in

client.loop.run_until_complete(start())

File "/usr/local/lib/python3.6/asyncio/base_events.py", line 488, in run_until_complete

return future.result()

File "./telegram-download-daemon.py", line 272, in start

await sendHelloMessage(client, peerChannel)

File "./telegram-download-daemon.py", line 112, in sendHelloMessage

entity = await client.get_entity(peerChannel)

File "/usr/local/lib/python3.6/site-packages/telethon/client/users.py", line 287, in get_entity

inputs.append(await self.get_input_entity(x))

File "/usr/local/lib/python3.6/site-packages/telethon/client/users.py", line 465, in get_input_entity

.format(peer, type(peer).__name__)

ValueError: Could not find the input entity for PeerUser(user_id=xxxxxxx) (PeerUser). Please read https://docs.telethon.dev/en/latest/concepts/entities.html to find out more details.

[ERROR/2021-11-14 21:15:24,668]asyncio:Task was destroyed but it is pending!

task: <Task pending coro=<worker() running at ./telegram-download-daemon.py:229> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0xf62670d0>()]>>

[ERROR/2021-11-14 21:15:24,669]asyncio:Task was destroyed but it is pending!

task: <Task pending coro=<worker() running at ./telegram-download-daemon.py:229> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0xf62670f0>()]>>

[ERROR/2021-11-14 21:15:24,669]asyncio:Task was destroyed but it is pending!

task: <Task pending coro=<worker() running at ./telegram-download-daemon.py:229> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0xf6267130>()]>>

[ERROR/2021-11-14 21:15:24,669]asyncio:Task was destroyed but it is pending!

task: <Task pending coro=<worker() running at ./telegram-download-daemon.py:229> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0xf6267150>()]>>

alfem commented

This scripts needs an user sessión (because of limitations in bots). Perhaps you have deleted the user chat from your client app, but I bet it is still 'alive'.

On the first execution of the daemon, it creates a file to store the session id (DownloadDaemon.session), have you deleted it?

it seems to be alive...
Yes, i deleted .session in some of the tries, some not... :(

Done. Thinking about your (because of limitations in bots), what I did: also deleted bot and started from a total zero. It didnt work at first but only when this new bot was admin for the channel. So, advices for clumsy people like me: nuke and start from scratch

:D thanks for your help and for this code!