[X] I am sure the error is coming from Pyrogram's code and not elsewhere
[X] I have searched in the issue tracker for similar bug reports, including closed ones
[X] I ran pip3 install -U https://github.com/pyrogram/pyrogram/archive/master.zip and reproduced the issue using the latest development version
Description
The error just appears when working with accounts; I can't pinpoint the exact place, but in my code, I switched to
getattr(user_obj, 'is_bot', False)
instead of
user_obj.is_bot
Steps to reproduce
-
Code example
-
Logs
backend_fastapi | Traceback (most recent call last):
backend_fastapi | File "/usr/local/lib/python3.10/site-packages/pyrogram/dispatcher.py", line 302, in handler_worker
backend_fastapi | await parser(update, users, chats)
backend_fastapi | File "/usr/local/lib/python3.10/site-packages/pyrogram/dispatcher.py", line 101, in message_parser
backend_fastapi | await pyrogram.types.Message._parse(
backend_fastapi | File "/usr/local/lib/python3.10/site-packages/pyrogram/types/messages_and_media/message.py", line 1225, in _parse
backend_fastapi | story = await types.Story._parse(client, users, chats, media, None, None, None, None)
backend_fastapi | File "/usr/local/lib/python3.10/site-packages/pyrogram/types/messages_and_media/story.py", line 260, in _parse
backend_fastapi | if story_id and not client.me.is_bot:
backend_fastapi | AttributeError: 'NoneType' object has no attribute 'is_bot'
Checklist
pip3 install -U https://github.com/pyrogram/pyrogram/archive/master.zip
and reproduced the issue using the latest development versionDescription
The error just appears when working with accounts; I can't pinpoint the exact place, but in my code, I switched to getattr(user_obj, 'is_bot', False) instead of user_obj.is_bot
Steps to reproduce
-
Code example
Logs