null-nick / pyrogrammod Goto Github PK
View Code? Open in Web Editor NEWPyrogramMod is an unofficial fork of github.com/pyrogram/pyrogram
License: GNU Lesser General Public License v3.0
PyrogramMod is an unofficial fork of github.com/pyrogram/pyrogram
License: GNU Lesser General Public License v3.0
pip3 install -U https://github.com/pyrogram/pyrogram/archive/master.zip
and reproduced the issue using the latest development versionThis error starting coming from previous few changes!
None
None
-12-11T19:01:39.032756662Z run = await app.send_photo(
2023-12-11T19:01:39.032759962Z ^^^^^^^^^^^^^^^^^^^^^
2023-12-11T19:01:39.032763362Z File "/opt/venv/lib/python3.12/site-packages/pyrogram/methods/messages/send_photo.py", line 188, in send_photo
2023-12-11T19:01:39.032767162Z r = await self.invoke(
2023-12-11T19:01:39.032770662Z ^^^^^^^^^^^^^^^^^^
2023-12-11T19:01:39.032774162Z File "/opt/venv/lib/python3.12/site-packages/pyrogram/methods/advanced/invoke.py", line 79, in invoke
2023-12-11T19:01:39.032777662Z r = await self.session.invoke(
2023-12-11T19:01:39.032780962Z ^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-12-11T19:01:39.032784362Z File "/opt/venv/lib/python3.12/site-packages/pyrogram/session/session.py", line 412, in invoke
2023-12-11T19:01:39.032803462Z return await self.invoke(query, retries - 1, timeout)
2023-12-11T19:01:39.032806962Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-12-11T19:01:39.032810262Z File "/opt/venv/lib/python3.12/site-packages/pyrogram/session/session.py", line 412, in invoke
2023-12-11T19:01:39.032813662Z return await self.invoke(query, retries - 1, timeout)
2023-12-11T19:01:39.032816962Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-12-11T19:01:39.032820262Z File "/opt/venv/lib/python3.12/site-packages/pyrogram/session/session.py", line 412, in invoke
2023-12-11T19:01:39.032823663Z return await self.invoke(query, retries - 1, timeout)
2023-12-11T19:01:39.032827063Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-12-11T19:01:39.032830263Z [Previous line repeated 7 more times]
2023-12-11T19:01:39.032833563Z File "/opt/venv/lib/python3.12/site-packages/pyrogram/session/session.py", line 402, in invoke
2023-12-11T19:01:39.032836963Z raise e from None
2023-12-11T19:01:39.032840263Z File "/opt/venv/lib/python3.12/site-packages/pyrogram/session/session.py", line 389, in invoke
2023-12-11T19:01:39.032843563Z return await self.send(query, timeout=timeout)
2023-12-11T19:01:39.032846863Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-12-11T19:01:39.032851463Z File "/opt/venv/lib/python3.12/site-packages/pyrogram/session/session.py", line 340, in send
2023-12-11T19:01:39.032854963Z raise e
2023-12-11T19:01:39.032858263Z File "/opt/venv/lib/python3.12/site-packages/pyrogram/session/session.py", line 337, in send
2023-12-11T19:01:39.032861663Z await self.connection.send(payload)
2023-12-11T19:01:39.032865063Z File "/opt/venv/lib/python3.12/site-packages/pyrogram/connection/connection.py", line 69, in send
2023-12-11T19:01:39.032868463Z await self.protocol.send(data)
2023-12-11T19:01:39.032871763Z File "/opt/venv/lib/python3.12/site-packages/pyrogram/connection/transport/tcp/tcp_abridged.py", line 38, in send
2023-12-11T19:01:39.032875163Z await super().send(
2023-12-11T19:01:39.032878363Z File "/opt/venv/lib/python3.12/site-packages/pyrogram/connection/transport/tcp/tcp.py", line 104, in send
2023-12-11T19:01:39.032881763Z raise OSError(e)
2023-12-11T19:01:39.032885063Z OSError: unable to perform operation on <TCPTransport closed=True reading=False 0x557c0f8f5730>; the handler is closed
pip3 install -U https://github.com/pyrogram/pyrogram/archive/master.zip
and reproduced the issue using the latest development versionI think its a pyrogram issue.
Not known.
[25-Nov-23 18:34:51 - ERROR] - pyrogram.dispatcher - 'ChannelForbidden' object has no attribute 'chat_id'
Traceback (most recent call last):
File "/opt/venv/lib/python3.11/site-packages/pyrogram/dispatcher.py", line 240, in handler_worker
await handler.callback(self.client, *args)
File "/opt/venv/lib/python3.11/site-packages/pytgcalls/mtproto/pyrogram_client.py", line 98, in on_update
chat_id = self.chat_id(data2[update.chat_id])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/pytgcalls/mtproto/bridged_client.py", line 98, in chat_id
return -input_peer.chat_id
^^^^^^^^^^^^^^^^^^
AttributeError: 'ChannelForbidden' object has no attribute 'chat_id'
### Logs
```shell
[25-Nov-23 18:34:51 - ERROR] - pyrogram.dispatcher - 'ChannelForbidden' object has no attribute 'chat_id'
Traceback (most recent call last):
File "/opt/venv/lib/python3.11/site-packages/pyrogram/dispatcher.py", line 240, in handler_worker
await handler.callback(self.client, *args)
File "/opt/venv/lib/python3.11/site-packages/pytgcalls/mtproto/pyrogram_client.py", line 98, in on_update
chat_id = self.chat_id(data2[update.chat_id])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/pytgcalls/mtproto/bridged_client.py", line 98, in chat_id
return -input_peer.chat_id
^^^^^^^^^^^^^^^^^^
AttributeError: 'ChannelForbidden' object has no attribute 'chat_id'
session = Session(
self, dc_id,
await Auth(self, dc_id, await self.storage.test_mode()).create()
if dc_id != await self.storage.dc_id()
else await self.storage.auth_key(),
await self.storage.test_mode(),
is_media=True
)
When we are uploading a big file, we get auth floods, to prevent it we can use media_sessions to get session ig ๐
session = self.media_sessions.get(dc_id)
if not session:
session = self.media_sessions[dc_id] = Session(....
)
await session.start()
Can we have only link_preview_options options in pyro too from bot api updates ?
pip3 install -U https://github.com/pyrogram/pyrogram/archive/master.zip
and reproduced the issue using the latest development versionGetting handler is closed error.
Just running the bot.
nill
-01-21T07:46:56.115221696Z [10] Retrying "messages.SendMessage" due to: unable to perform operation on <TCPTransport closed=True reading=False 0x7fc0edd24ff0>; the handler is closed
2024-01-21T07:46:56.623466868Z unable to perform operation on <TCPTransport closed=True reading=False 0x7fc0edd24ff0>; the handler is closed
2024-01-21T07:46:56.623511959Z Traceback (most recent call last):
2024-01-21T07:46:56.623516067Z File "/opt/venv/lib/python3.12/site-packages/pyrogram/dispatcher.py", line 240, in handler_worker
2024-01-21T07:46:56.623519617Z await handler.callback(self.client, *args)
2024-01-21T07:46:56.623522481Z File "./main.py", line 58, in start
2024-01-21T07:46:56.623525343Z File "/opt/venv/lib/python3.12/site-packages/pyrogram/types/messages_and_media/message.py", line 1003, in reply_text
2024-01-21T07:46:56.623528293Z return await self._client.send_message(
2024-01-21T07:46:56.623531375Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-01-21T07:46:56.623534072Z File "/opt/venv/lib/python3.12/site-packages/pyrogram/methods/messages/send_message.py", line 137, in send_message
2024-01-21T07:46:56.623537073Z r = await self.invoke(
2024-01-21T07:46:56.623539749Z ^^^^^^^^^^^^^^^^^^
2024-01-21T07:46:56.623542399Z File "/opt/venv/lib/python3.12/site-packages/pyrogram/methods/advanced/invoke.py", line 79, in invoke
2024-01-21T07:46:56.623545227Z r = await self.session.invoke(
2024-01-21T07:46:56.623547971Z ^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-01-21T07:46:56.623562414Z File "/opt/venv/lib/python3.12/site-packages/pyrogram/session/session.py", line 412, in invoke
2024-01-21T07:46:56.623565580Z return await self.invoke(query, retries - 1, timeout)
2024-01-21T07:46:56.623568361Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-01-21T07:46:56.623571134Z File "/opt/venv/lib/python3.12/site-packages/pyrogram/session/session.py", line 412, in invoke
2024-01-21T07:46:56.623573918Z return await self.invoke(query, retries - 1, timeout)
2024-01-21T07:46:56.623576605Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-01-21T07:46:56.623579298Z File "/opt/venv/lib/python3.12/site-packages/pyrogram/session/session.py", line 412, in invoke
2024-01-21T07:46:56.623582109Z return await self.invoke(query, retries - 1, timeout)
2024-01-21T07:46:56.623584849Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-01-21T07:46:56.623587702Z [Previous line repeated 7 more times]
2024-01-21T07:46:56.623590448Z File "/opt/venv/lib/python3.12/site-packages/pyrogram/session/session.py", line 402, in invoke
2024-01-21T07:46:56.623593382Z raise e from None
2024-01-21T07:46:56.623596092Z File "/opt/venv/lib/python3.12/site-packages/pyrogram/session/session.py", line 389, in invoke
2024-01-21T07:46:56.623612377Z return await self.send(query, timeout=timeout)
2024-01-21T07:46:56.623615312Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-01-21T07:46:56.623618023Z File "/opt/venv/lib/python3.12/site-packages/pyrogram/session/session.py", line 340, in send
2024-01-21T07:46:56.623620868Z raise e
2024-01-21T07:46:56.623624305Z File "/opt/venv/lib/python3.12/site-packages/pyrogram/session/session.py", line 337, in send
2024-01-21T07:46:56.623637592Z await self.connection.send(payload)
2024-01-21T07:46:56.623640583Z File "/opt/venv/lib/python3.12/site-packages/pyrogram/connection/connection.py", line 69, in send
2024-01-21T07:46:56.623643396Z await self.protocol.send(data)
2024-01-21T07:46:56.623646022Z File "/opt/venv/lib/python3.12/site-packages/pyrogram/connection/transport/tcp/tcp_abridged.py", line 38, in send
2024-01-21T07:46:56.623648855Z await super().send(
2024-01-21T07:46:56.623651466Z File "/opt/venv/lib/python3.12/site-packages/pyrogram/connection/transport/tcp/tcp.py", line 104, in send
2024-01-21T07:46:56.623654277Z raise OSError(e)
2024-01-21T07:46:56.623656914Z OSError: unable to perform operation on <TCPTransport closed=True reading=False 0x7fc0edd24ff0>; the handler is closed
Hi there, can you please add has_spoiler field for copy message too?
Tracking issue for:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.