Coder Social home page Coder Social logo

pyrogrammod's People

Contributors

1pyxa1 avatar adolfaka avatar alissonlauffer avatar bakatrouble avatar colinshark avatar customicon avatar cyanbook avatar delivrance avatar furoin avatar harsh-br0 avatar jonatan1609 avatar josxa avatar kalmengr avatar krishna-singhal avatar mahesh0253 avatar mendelmaleh avatar mrnaif2018 avatar null-nick avatar octonezd avatar princic-1837592 avatar ripeey avatar roj1512 avatar shivangkakkar avatar smartmanoj avatar spechide avatar sunda001 avatar teriks avatar trenoduro avatar xsolinsx avatar yoilyl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

pyrogrammod's Issues

Bug

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

This error starting coming from previous few changes!

Steps to reproduce

None

Code example

None

Logs

-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

Error

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

I think its a pyrogram issue.

Steps to reproduce

Not known.

Code example

[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'

Use media_sessions to prevent connection to dc every time in get_file

Checklist

  • I believe the idea is awesome and would benefit the framework
  • I have searched in the issue tracker for similar requests, including closed ones

Description

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()

link_preview_options from bot api

Checklist

  • I believe the idea is awesome and would benefit the framework
  • I have searched in the issue tracker for similar requests, including closed ones

Description

Can we have only link_preview_options options in pyro too from bot api updates ?

Handler is closed.

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

Getting handler is closed error.

Steps to reproduce

Just running the bot.

Code example

nill

Logs

-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

Add support for spoilers in copy_message

Checklist

  • I believe the idea is awesome and would benefit the framework
  • I have searched in the issue tracker for similar requests, including closed ones

Description

Hi there, can you please add has_spoiler field for copy message too?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.