Skip to content
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: 'BadMsgNotification' object has no attribute 'type' #7

Open
ehhramaaa opened this issue May 13, 2024 · 1 comment
Open

Comments

@ehhramaaa
Copy link

Traceback (most recent call last):
File "N:\Coding\python\YesCoinBot\test.py", line 22, in
with app:
File "N:\Coding\python\YesCoinBot\venv\lib\site-packages\pyrogram\client.py", line 302, in enter
return self.start()
File "N:\Coding\python\YesCoinBot\venv\lib\site-packages\pyrogram\sync.py", line 66, in async_to_sync_wrap
return loop.run_until_complete(coroutine)
File "C:\Users\Admin\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 641, in run_until_complete
return future.result()
File "N:\Coding\python\YesCoinBot\venv\lib\site-packages\pyrogram\methods\utilities\start.py", line 62, in start
await self.authorize()
File "N:\Coding\python\YesCoinBot\venv\lib\site-packages\pyrogram\client.py", line 359, in authorize
sent_code = await self.send_code(self.phone_number)
File "N:\Coding\python\YesCoinBot\venv\lib\site-packages\pyrogram\methods\auth\send_code.py", line 79, in send_code
return types.SentCode._parse(r)
File "N:\Coding\python\YesCoinBot\venv\lib\site-packages\pyrogram\types\authorization\sent_code.py", line 58, in _parse
type=enums.SentCodeType(type(sent_code.type)),
AttributeError: 'BadMsgNotification' object has no attribute 'type'

Excuseme Sir, Is this due to the difference in my device's time or what?

@ehhramaaa
Copy link
Author

{
"_": "types.BadMsgNotification",
"bad_msg_id": 7368329039842377732,
"bad_msg_seqno": 5,
"error_code": 17
}

I printed out send_code and the output same error code 17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant