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

Error #45

Closed
DLX23 opened this issue Mar 22, 2021 · 3 comments
Closed

Error #45

DLX23 opened this issue Mar 22, 2021 · 3 comments

Comments

@DLX23
Copy link

DLX23 commented Mar 22, 2021

i go the following error (Win10,Python 3.9.2):

Telegram Download Daemon 1.4
Traceback (most recent call last):
  File "M:\telepy\telegram-download-daemon.py", line 224, in <module>
    client.loop.run_until_complete(start())
  File "C:\Users\Maik\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 642, in run_until_complete
    return future.result()
  File "M:\telepy\telegram-download-daemon.py", line 218, in start
    await sendHelloMessage(client, peerChannel)
  File "M:\telepy\telegram-download-daemon.py", line 100, in sendHelloMessage
    await client.send_message(entity, "Telegram Download Daemon "+TDD_VERSION)
  File "C:\Users\Maik\AppData\Local\Programs\Python\Python39\lib\site-packages\telethon\client\messages.py", line 826, in send_message
    result = await self(request)
  File "C:\Users\Maik\AppData\Local\Programs\Python\Python39\lib\site-packages\telethon\client\users.py", line 30, in __call__
    return await self._call(self._sender, request, ordered=ordered)
  File "C:\Users\Maik\AppData\Local\Programs\Python\Python39\lib\site-packages\telethon\client\users.py", line 79, in _call
    result = await future
telethon.errors.rpcerrorlist.ChatAdminRequiredError: Chat admin privileges are required to do that in the specified chat (for example, to send a message in a channel which is not yours), or invalid permissions used for the channel or group (caused by SendMessageRequest)
[ERROR/2021-03-22 11:34:47,712]asyncio:Task was destroyed but it is pending!
task: <Task pending name='Task-10' coro=<worker() running at M:\telepy\telegram-download-daemon.py:189> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x000001FB4FA01520>()]>>

@alfem
Copy link
Owner

alfem commented Mar 22, 2021

Probably the channel_id you are using is not correct. Please, check this id belongs to the daemon user.

@DLX23
Copy link
Author

DLX23 commented Mar 22, 2021

Channel ID is the number after "C" and before "_" in Telegram Web URL?

@alfem
Copy link
Owner

alfem commented Mar 24, 2021

No, it is not.

Check this: https://gist.github.com/mraaroncruz/e76d19f7d61d59419002db54030ebe35

You can also get your channel id programatically or simply add one of those "get my id" bots to the channel.

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