-
Notifications
You must be signed in to change notification settings - Fork 78
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
AttributeError: 'NoneType' object has no attribute 'id' #21
Comments
@Athirst1998 The code and error are no where related tho |
I got same error:
it's latest version from pypi |
@AbirHasan2005 try message.sender_chat.id |
@AbirHasan2005 https://t.me/pyrogramchat/535246 look here.. |
Same error, in same file listen.py happen if a group/supergroup or channel start a live broadcast (video call, group call or whatever you want to call it)! Add: |
From tg “My problem is solved
|
i got the same error in my code only when I import pyromod. With parogram alone it runs fine. Pls fix the bug |
using v2.0.0, and constantly get the same error :
|
@EDM115 Umm |
I modified pyromod and fixed this error long time ago, this error happen because not all updates have chat.id or from_user.id or a message id, but pyromod use these on every request, for example if an update came from a channel or from live broadcast update of a group/channel etc message.from_user.id is not present at all! Not even as "None". If you implement the code of the pull request #22 problem disappear and all work great even after many tests. I hope that will be implemented asap! |
I am also getting the same error:
Using the latest version (i.e. 2.0.0) from pypi |
#30 fixes this! |
when I send a message to channel , the bot raise this error:
'NoneType' object has no attribute 'id'
Traceback (most recent call last):
File ".....venv/lib/python3.10/site-packages/pyrogram/dispatcher.py", line 226, in handler_worker
if await handler.check(self.client, parsed_update):
File "......venv/lib/python3.10/site-packages/pyromod/listen/listen.py", line 196, in check
(message.chat.id, message.from_user.id, message.id),
AttributeError: 'NoneType' object has no attribute 'id'
how can I fix error?
The text was updated successfully, but these errors were encountered: