You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A channel I was admin at got deleted, and (i think) that is causing the uncatched ChatAdminRequiredError exception thrown at async for user in self.telegram_client.iter_participants(chat.id): in telegram.py (line 180) to exit irgramd:
Traceback (most recent call last):
File "/home/lucas/./irgramd/irgramd", line 161, in <module>
loop.run_until_complete(irc_server.run(options))
File "/usr/local/lib/python3.11/asyncio/base_events.py", line 654, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/home/lucas/./irgramd/irgramd", line 63, in run
await self.tg_handler.initialize_telegram()
File "/home/lucas/irgramd/telegram.py", line 137, in initialize_telegram
await self.continue_auth()
File "/home/lucas/irgramd/telegram.py", line 143, in continue_auth
await self.init_mapping()
File "/home/lucas/irgramd/telegram.py", line 157, in init_mapping
await self.set_irc_channel_from_telegram(chat)
File "/home/lucas/irgramd/telegram.py", line 180, in set_irc_channel_from_telegram
async for user in self.telegram_client.iter_participants(chat.id):
File "/home/lucas/pip/lib/python3.11/site-packages/telethon/requestiter.py", line 74, in __anext__
if await self._load_next_chunk():
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/lucas/pip/lib/python3.11/site-packages/telethon/client/chats.py", line 210, in _load_next_chunk
participants = await self.client(self.requests)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/lucas/pip/lib/python3.11/site-packages/telethon/client/users.py", line 30, in __call__
return await self._call(self._sender, request, ordered=ordered)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/lucas/pip/lib/python3.11/site-packages/telethon/client/users.py", line 87, 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 GetParticipantsRequest)
I could bandaid-fix it by just ignoring every exception at this loop. There's certainly a proper way to fix that (which i dont know how to help with... my python knowledge is pretty basic (learnt years ago; havent practiced since).
The text was updated successfully, but these errors were encountered:
Hi, sorry for the delay and thanks for your report.
I cannot reproduce this, the error message suggests that, for some reason, there is a channel that you don't have permission to see its members, so I just have caught the exception and sent a warning to the log, this code is in the branch try_participants.
@phillbush please let me know if this fixes your problem, of course the affected channel (you could see in the log which is) will be seen as empty (with no members) from IRC, but hopefully you could still send messages, etc.
Hi,
A channel I was admin at got deleted, and (i think) that is causing the uncatched
ChatAdminRequiredError
exception thrown atasync for user in self.telegram_client.iter_participants(chat.id):
intelegram.py
(line 180) to exit irgramd:I could bandaid-fix it by just ignoring every exception at this loop. There's certainly a proper way to fix that (which i dont know how to help with... my python knowledge is pretty basic (learnt years ago; havent practiced since).
The text was updated successfully, but these errors were encountered: