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
I am sure the error is coming from Pyrogram's code and not elsewhere
I have searched in the issue tracker for similar bug reports, including closed ones
I ran pip3 install -U https://github.com/pyrogram/pyrogram/archive/master.zip and reproduced the issue using the latest development version
Description
I found a single chat where the pinned messages has, for some reason unknown to me, a wrong id.
The problem is that, for that reason I'm unable to interact with the chat. It is possible to use a try except block for the pinned message retrieval?
Steps to reproduce
I simply get this error using the get chat on a chat called "vezzoblog". Up until now it's the only chat i had this problem
Traceback (most recent call last):
File "mydir/test_pyrogram.py", line 56, in<module>
app.get_chat("vezzoblog")
File "/.cache/pypoetry/virtualenvs/envname/lib/python3.10/site-packages/pyrogram/sync.py", line 66, in async_to_sync_wrap
return loop.run_until_complete(coroutine)
File "/usr/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
returnfuture.result()
File "/.cache/pypoetry/virtualenvs/envname/lib/python3.10/site-packages/pyrogram/methods/chats/get_chat.py", line 87, in get_chat
return await types.Chat._parse_full(self, r)
File "/.cache/pypoetry/virtualenvs/envname/lib/python3.10/site-packages/pyrogram/types/user_and_chats/chat.py", line 511, in _parse_full
parsed_chat.pinned_message = await client.get_messages(
File "/.cache/pypoetry/virtualenvs/envname/lib/python3.10/site-packages/pyrogram/methods/messages/get_messages.py", line 117, in get_messages
messages = await utils.parse_messages(self, r, replies=replies)
File "/.cache/pypoetry/virtualenvs/envname/lib/python3.10/site-packages/pyrogram/utils.py", line 155, in parse_messages
reply_messages = await client.get_messages(
File "/.cache/pypoetry/virtualenvs/envname/lib/python3.10/site-packages/pyrogram/methods/messages/get_messages.py", line 115, in get_messages
r = await self.invoke(rpc, sleep_threshold=-1)
File "/.cache/pypoetry/virtualenvs/envname/lib/python3.10/site-packages/pyrogram/methods/advanced/invoke.py", line 94, in invoke
r = await session.invoke(
File "/.cache/pypoetry/virtualenvs/envname/lib/python3.10/site-packages/pyrogram/session/session.py", line 399, in invoke
return await self.send(query, timeout=timeout)
File "/.cache/pypoetry/virtualenvs/envname/lib/python3.10/site-packages/pyrogram/session/session.py", line 367, in send
RPCError.raise_it(result, type(data))
File "/.cache/pypoetry/virtualenvs/envname/lib/python3.10/site-packages/pyrogram/errors/rpc_error.py", line 91, in raise_it
raise getattr(
pyrogram.errors.exceptions.bad_request_400.MessageIdsEmpty: Telegram says: [400 MESSAGE_IDS_EMPTY] - The requested message doesn't exist or you provided no message id (caused by "channels.GetMessages")
The text was updated successfully, but these errors were encountered:
Checklist
pip3 install -U https://github.com/pyrogram/pyrogram/archive/master.zip
and reproduced the issue using the latest development versionDescription
I found a single chat where the pinned messages has, for some reason unknown to me, a wrong id.
The problem is that, for that reason I'm unable to interact with the chat. It is possible to use a try except block for the pinned message retrieval?
Steps to reproduce
I simply get this error using the get chat on a chat called "vezzoblog". Up until now it's the only chat i had this problem
Code example
Logs
The text was updated successfully, but these errors were encountered: