TelegramPlayGround / pyrogram

PyroGramFORK | Telegram MTProto API framework in Python for users and bots | PyroGramFORK
https://telegramplayground.github.io/pyrogram/
GNU Lesser General Public License v3.0
52 stars 9 forks source link

the handler is closed #27

Open fivepe opened 1 month ago

fivepe commented 1 month ago

Checklist

Description

i am getting this exact error when sending files. it looks like this though, this is really interrupting my bot. would appreciate any advice.

Steps to reproduce

Traceback (most recent call last): File "//venv/lib/python3.12/site-packages/pyrogram/methods/advanced/save_file.py", line 109, in worker await session.invoke(data) File "//venv/lib/python3.12/site-packages/pyrogram/session/session.py", line 422, in invoke return await self.invoke(query, retries - 1, timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "//venv/lib/python3.12/site-packages/pyrogram/session/session.py", line 422, in invoke return await self.invoke(query, retries - 1, timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "//venv/lib/python3.12/site-packages/pyrogram/session/session.py", line 422, in invoke return await self.invoke(query, retries - 1, timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [Previous line repeated 7 more times] File "//venv/lib/python3.12/site-packages/pyrogram/session/session.py", line 412, in invoke raise e from None File "//venv/lib/python3.12/site-packages/pyrogram/session/session.py", line 399, in invoke return await self.send(query, timeout=timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "//venv/lib/python3.12/site-packages/pyrogram/session/session.py", line 350, in send raise e File "//venv/lib/python3.12/site-packages/pyrogram/session/session.py", line 347, in send await self.connection.send(payload) File "//venv/lib/python3.12/site-packages/pyrogram/connection/connection.py", line 69, in send await self.protocol.send(data) File "//venv/lib/python3.12/site-packages/pyrogram/connection/transport/tcp/tcp_abridged.py", line 38, in send await super().send( File "//venv/lib/python3.12/site-packages/pyrogram/connection/transport/tcp/tcp.py", line 104, in send raise OSError(e) OSError: unable to perform operation on <TCPTransport closed=True reading=False 0x105e929b0>; the handler is closed [10] Retrying "upload.SaveBigFilePart" due to: unable to perform operation on <TCPTransport closed=True reading=False 0x105e929b0>; the handler is closed [10] Retrying "upload.SaveBigFilePart" due to: unable to perform operation on <TCPTransport closed=True reading=False 0x105e929b0>; the handler is closed [10] Retrying "upload.SaveBigFilePart" due to: unable to perform operation on <TCPTransport closed=True reading=False 0x105e929b0>; the handler is closed [10] Retrying "upload.SaveBigFilePart" due to: unable to perform operation on <TCPTransport closed=True reading=False 0x105e929b0>; the handler is closed unable to perform operation on <TCPTransport closed=True reading=False 0x105e929b0>; the handler is closed

Code example

No response

Logs

No response

SpEcHiDe commented 1 month ago

I am also facing same issue, but I do not know how to solve it.

annihilatorrrr commented 1 month ago

I am also facing same issue, but I do not know how to solve it.

same and A LOT LOT.

annihilatorrrr commented 1 month ago

I am also facing same issue, but I do not know how to solve it.

same and A LOT LOT.

i do restart only as only solution, happens too much for userbots than bots.

fivepe commented 1 month ago

my current solution is also to restart the client, but this will affect other ongoing tasks

I am also facing same issue, but I do not know how to solve it.

same and A LOT LOT.

i do restart only as only solution, happens too much for userbots than bots.

my current solution is also to restart the client, but this will affect other ongoing tasks

annihilatorrrr commented 1 month ago

my current solution is also to restart the client, but this will affect other ongoing tasks

I am also facing same issue, but I do not know how to solve it.

same and A LOT LOT.

i do restart only as only solution, happens too much for userbots than bots.

my current solution is also to restart the client, but this will affect other ongoing tasks

true, same.

SpEcHiDe commented 2 weeks ago

Please retry with pyrotgfork==2.1.32.9 and reply here if issue still persists.

fivepe commented 2 weeks ago

Please retry with pyrotgfork==2.1.32.9 and reply here if issue still persists.

still persists image