BlackJkee / NotPixelBot

Python bot for farming Not Pixel telegram bot.
https://t.me/BlackJkeeTools
Apache License 2.0
21 stars 7 forks source link

AttributeError: 'BadMsgNotification' object has no attribute 'type' #5

Closed Pegahan closed 2 months ago

Pegahan commented 2 months ago

Hi. When I request to create a session, I get the following error: BadMsgNotification: [17] The msg_id is too high, the client time has to be synchronized. Traceback (most recent call last): File "D:\Bot\BlackJkee-NotPixelBot\main.py", line 15, in asyncio.run(main()) File "C:\Users\user-1\AppData\Local\Programs\Python\Python310\lib\asyncio\runners.py", line 44, in run return loop.run_until_complete(main) File "C:\Users\user-1\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 641, in run_until_complete return future.result() File "D:\Bot\BlackJkee-NotPixelBot\main.py", line 10, in main await process() File "D:\Bot\BlackJkee-NotPixelBot\bot\utils\launcher.py", line 66, in process await register_sessions() File "D:\Bot\BlackJkee-NotPixelBot\bot\core\registrator.py", line 23, in register_sessions async with session: File "C:\Users\user-1\AppData\Local\Programs\Python\Python310\lib\site-packages\pyrogram\client.py", line 311, in aenter return await self.start() File "C:\Users\user-1\AppData\Local\Programs\Python\Python310\lib\site-packages\pyrogram\methods\utilities\start.py", line 62, in start await self.authorize() File "C:\Users\user-1\AppData\Local\Programs\Python\Python310\lib\site-packages\pyrogram\client.py", line 359, in authorize sent_code = await self.send_code(self.phone_number) File "C:\Users\user-1\AppData\Local\Programs\Python\Python310\lib\site-packages\pyrogram\methods\auth\send_code.py", line 79, in send_code return types.SentCode._parse(r) File "C:\Users\user-1\AppData\Local\Programs\Python\Python310\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'

BlackJkee commented 2 months ago

Make sure that the phone number and API data (API ID and API Hash) are correct. An error may occur due to incorrect data. Also, try to delete the old session and create a new one.