-
Notifications
You must be signed in to change notification settings - Fork 72
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
when a handler starts processing in pyrogram, It raises the following error. why? #57
Comments
I am also facing this same error when I ran code locally(it was one file code), it ran perfectly with no error. But when i splitted my file into different files and tried hosting on Koyeb, it threw same error..
|
Their was a silly mistake😅 While splitting of code, i used everywhere pyromod but didn't use Client from pyromod and initiated bot with pyrogram.. When i changed the Client import from pyrogram to pyromod just, its working fine now |
'Client' object has no attribute 'listeners'
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/pyrogram/dispatcher.py", line 226, in handler_worker
if await handler.check(self.client, parsed_update):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pyromod/listen/message_handler.py", line 58, in check
await self.check_if_has_matching_listener(client, message)
File "/usr/local/lib/python3.12/site-packages/pyromod/listen/message_handler.py", line 37, in check_if_has_matching_listener
listener = client.get_listener_matching_with_data(data, ListenerTypes.MESSAGE)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pyrogram/sync.py", line 53, in async_to_sync_wrap
coroutine = function(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pyromod/listen/client.py", line 123, in get_listener_matching_with_data
for listener in self.listeners[listener_type]:
^^^^^^^^^^^^^^
AttributeError: 'Client' object has no attribute 'listeners'. Did you mean: 'listen'?
The text was updated successfully, but these errors were encountered: