pyrofork icon indicating copy to clipboard operation
pyrofork copied to clipboard

Connection Lost

Open Eikosa opened this issue 1 year ago • 0 comments

Checklist

  • [X] I am sure the error is coming from Pyrogram's code and not elsewhere
  • [X] I have searched in the issue tracker for similar bug reports, including closed ones
  • [X] I ran pip3 install -U https://github.com/Mayuri-Chan/pyrofork/archive/master.zip and reproduced the issue using the latest development version

Description

.

Steps to reproduce

I don't know how it happened, I get this error when I run my bot and it doesn't reply to my messages

Code example

No response

Logs

[31-Dec-23 20:40:50 - INFO] - pyrogram.session.session - [6] Retrying "channels.GetMessages" due to: Connection lost
[31-Dec-23 20:40:50 - WARNING] - asyncio - socket.send() raised exception.
[31-Dec-23 20:40:50 - INFO] - pyrogram.connection.transport.tcp.tcp - Send exception: ConnectionResetError Connection lost
[31-Dec-23 20:40:50 - ERROR] - pyrogram.dispatcher - Connection lost
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/dist-packages/pyrogram/dispatcher.py", line 226, in handler_worker
    await parser(update, users, chats)
  File "/usr/local/lib/python3.11/dist-packages/pyrogram/dispatcher.py", line 73, in message_parser
    await pyrogram.types.Message._parse(self.client, update.message, users, chats,
  File "/usr/local/lib/python3.11/dist-packages/pyrogram/types/messages_and_media/message.py", line 1103, in _parse
    reply_to_message = await client.get_messages(
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/pyrogram/methods/messages/get_messages.py", line 115, in get_messages
    r = await self.invoke(rpc, sleep_threshold=-1)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/pyrogram/methods/advanced/invoke.py", line 79, in invoke
    r = await self.session.invoke(
        ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/pyrogram/session/session.py", line 425, in invoke
    return await self.invoke(query, retries - 1, timeout)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/pyrogram/session/session.py", line 425, in invoke
    return await self.invoke(query, retries - 1, timeout)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/pyrogram/session/session.py", line 425, in invoke
    return await self.invoke(query, retries - 1, timeout)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  [Previous line repeated 7 more times]
  File "/usr/local/lib/python3.11/dist-packages/pyrogram/session/session.py", line 415, in invoke
    raise e from None
  File "/usr/local/lib/python3.11/dist-packages/pyrogram/session/session.py", line 402, in invoke
    return await self.send(query, timeout=timeout)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/pyrogram/session/session.py", line 342, in send
    raise e
  File "/usr/local/lib/python3.11/dist-packages/pyrogram/session/session.py", line 339, in send
    await self.connection.send(payload)
  File "/usr/local/lib/python3.11/dist-packages/pyrogram/connection/connection.py", line 71, in send
    await self.protocol.send(data)
  File "/usr/local/lib/python3.11/dist-packages/pyrogram/connection/transport/tcp/tcp_abridged.py", line 38, in send
    await super().send(
  File "/usr/local/lib/python3.11/dist-packages/pyrogram/connection/transport/tcp/tcp.py", line 104, in send
    raise OSError(e)
OSError: Connection lost
[31-Dec-23 20:40:50 - WARNING] - asyncio - socket.send() raised exception.

Eikosa avatar Jan 05 '24 13:01 Eikosa