Closed ZenhAlter closed 2 weeks ago
When creating a new session, it gives an error:
> 2
Enter the session name (press Enter to exit): TG_00
Input the proxy in the format type://user:pass:ip:port (press Enter to use without proxy):
BadMsgNotification: [17] The msg_id is too high, the client time has to be synchronized.
BadMsgNotification: [17] The msg_id is too high, the client time has to be synchronized.
Welcome to Pyrogram (version 2.0.106)
Pyrogram is free software and comes with ABSOLUTELY NO WARRANTY. Licensed
under the terms of the GNU Lesser General Public License v3.0 (LGPL-3.0).
Enter phone number or bot token: +[deleted]
Is "+[deleted]" correct? (y/N): y
BadMsgNotification: [17] The msg_id is too high, the client time has to be synchronized.
Traceback (most recent call last):
File "/home/user/farm/notpixel/vadim/notpixel/main.py", line 15, in <module>
asyncio.run(main())
File "/usr/lib/python3.11/asyncio/runners.py", line 190, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/home/user/farm/notpixel/vadim/notpixel/main.py", line 10, in main
await process()
File "/home/user/farm/notpixel/vadim/notpixel/bot/utils/launcher.py", line 77, in process
await register_sessions()
File "/home/user/farm/notpixel/vadim/notpixel/bot/core/registrator.py", line 23, in register_sessions
async with session:
File "/home/user/farm/notpixel/vadim/notpixel/venv/lib/python3.11/site-packages/pyrogram/client.py", line 311, in __aenter__
return await self.start()
^^^^^^^^^^^^^^^^^^
File "/home/user/farm/notpixel/vadim/notpixel/venv/lib/python3.11/site-packages/pyrogram/methods/utilities/start.py", line 62, in start
await self.authorize()
File "/home/user/farm/notpixel/vadim/notpixel/venv/lib/python3.11/site-packages/pyrogram/client.py", line 359, in authorize
sent_code = await self.send_code(self.phone_number)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/farm/notpixel/vadim/notpixel/venv/lib/python3.11/site-packages/pyrogram/methods/auth/send_code.py", line 79, in send_code
return types.SentCode._parse(r)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/farm/notpixel/vadim/notpixel/venv/lib/python3.11/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'
done
PLEASE EDIT .ENV FILE
I understand that this is a client and server time synchronization error. On the client side, the time has not changed and is up to date. This bot used to work, but suddenly it started giving such errors.
I managed to solve the problem. I didn't think the difference of a few seconds was so significant.
This error does not disappear even if you delete everything and download the project again and configure .env