Skip to content
This repository has been archived by the owner on Sep 30, 2022. It is now read-only.

Database error for user IDs with 10 digits #110

Closed
Kabyss opened this issue Feb 23, 2022 · 2 comments
Closed

Database error for user IDs with 10 digits #110

Kabyss opened this issue Feb 23, 2022 · 2 comments

Comments

@Kabyss
Copy link

Kabyss commented Feb 23, 2022

Seeing the following error for accounts with new 10 digit user ID system. Accounts that have 9 or less digit user IDs are working fine. probably related to https://core.telegram.org/bots/api#march-9-2021, where it says

user identifiers can now have up to 52 significant bits and require a 64-bit integer or double-precision float type to be stored safely.

Could you please suggest a solution?

Example error details-

sqlalchemy.exc.DataError: (psycopg2.errors.NumericValueOutOfRange) integer out of range

[SQL: INSERT INTO afk_users (user_id, is_afk, reason) VALUES (%(user_id)s, %(is_afk)s, %(reason)s)]
[parameters: {'user_id': 1234567890, 'is_afk': True, 'reason': 'test'}]
(Background on this error at: https://sqlalche.me/e/14/9h9h)

@PaulSonOfLars
Copy link
Owner

As mentioned in the readme, this project is no longer maintained.
There has been no work to add support for any of the new features or breaking changes added to the bot API over the past few years, and as such, there are no guarantees on anything working as expected.

As you've noted, this is an issue to do with user IDs now being larger than 32bits. I recommend you fix this in your own code - You can find examples of how to do this in #109.

@Kabyss
Copy link
Author

Kabyss commented Feb 23, 2022

Thanks for the response and the hint, it was helpful in fixing the issue.

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

No branches or pull requests

2 participants