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

showt he handler has been closed when running #52

Open
3 tasks done
fivepe opened this issue May 9, 2024 · 1 comment
Open
3 tasks done

showt he handler has been closed when running #52

fivepe opened this issue May 9, 2024 · 1 comment

Comments

@fivepe
Copy link

fivepe commented May 9, 2024

Checklist

  • 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

showt he handler has been closed when running

Steps to reproduce

[10] Retrying "channels.GetChannels" due to: unable to perform operation on <TCPTransport closed=True reading=False 0x5b8fdc0>; the handler is closed
Task exception was never retrieved
future: <Task finished name='Task-2018290' coro=<Client.handle_updates() done, defined at /usr/local/lib/python3.8/dist-packages/pyrogram/client.py:582> exception=OSError(RuntimeError('unable to perform operation on <TCPTransport closed=True reading=False 0x5b8fdc0>; the handler is closed'))>
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/pyrogram/client.py", line 627, in handle_updates
channel=await self.resolve_peer(utils.get_channel_id(channel_id)),
File "/usr/local/lib/python3.8/dist-packages/pyrogram/methods/advanced/resolve_peer.py", line 111, in resolve_peer
await self.invoke(
File "/usr/local/lib/python3.8/dist-packages/pyrogram/methods/advanced/invoke.py", line 94, in invoke
r = await session.invoke(
File "/usr/local/lib/python3.8/dist-packages/pyrogram/session/session.py", line 422, in invoke
return await self.invoke(query, retries - 1, timeout)
File "/usr/local/lib/python3.8/dist-packages/pyrogram/session/session.py", line 422, in invoke
return await self.invoke(query, retries - 1, timeout)
File "/usr/local/lib/python3.8/dist-packages/pyrogram/session/session.py", line 422, in invoke
return await self.invoke(query, retries - 1, timeout)
[Previous line repeated 7 more times]
File "/usr/local/lib/python3.8/dist-packages/pyrogram/session/session.py", line 412, in invoke
raise e from None
File "/usr/local/lib/python3.8/dist-packages/pyrogram/session/session.py", line 399, in invoke
return await self.send(query, timeout=timeout)
File "/usr/local/lib/python3.8/dist-packages/pyrogram/session/session.py", line 350, in send
raise e
File "/usr/local/lib/python3.8/dist-packages/pyrogram/session/session.py", line 347, in send
await self.connection.send(payload)
File "/usr/local/lib/python3.8/dist-packages/pyrogram/connection/connection.py", line 69, in send
await self.protocol.send(data)
File "/usr/local/lib/python3.8/dist-packages/pyrogram/connection/transport/tcp/tcp_abridged.py", line 38, in send
await super().send(
File "/usr/local/lib/python3.8/dist-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 0x5b8fdc0>; the handler is closed

Code example

No response

Logs

No response

@asdfzxcvbn
Copy link

i am also getting this exact error when sending files. it looks like this though:

Traceback (most recent call last):
  File "/<redacted>/venv/lib/python3.12/site-packages/pyrogram/methods/advanced/save_file.py", line 109, in worker
    await session.invoke(data)
  File "/<redacted>/venv/lib/python3.12/site-packages/pyrogram/session/session.py", line 422, in invoke
    return await self.invoke(query, retries - 1, timeout)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/<redacted>/venv/lib/python3.12/site-packages/pyrogram/session/session.py", line 422, in invoke
    return await self.invoke(query, retries - 1, timeout)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/<redacted>/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 "/<redacted>/venv/lib/python3.12/site-packages/pyrogram/session/session.py", line 412, in invoke
    raise e from None
  File "/<redacted>/venv/lib/python3.12/site-packages/pyrogram/session/session.py", line 399, in invoke
    return await self.send(query, timeout=timeout)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/<redacted>/venv/lib/python3.12/site-packages/pyrogram/session/session.py", line 350, in send
    raise e
  File "/<redacted>/venv/lib/python3.12/site-packages/pyrogram/session/session.py", line 347, in send
    await self.connection.send(payload)
  File "/<redacted>/venv/lib/python3.12/site-packages/pyrogram/connection/connection.py", line 69, in send
    await self.protocol.send(data)
  File "/<redacted>/venv/lib/python3.12/site-packages/pyrogram/connection/transport/tcp/tcp_abridged.py", line 38, in send
    await super().send(
  File "/<redacted>/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

this is really interrupting my bot. would appreciate any advice.

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