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

how to format? #3

Closed
ghost opened this issue Jun 8, 2021 · 4 comments
Closed

how to format? #3

ghost opened this issue Jun 8, 2021 · 4 comments

Comments

@ghost
Copy link

ghost commented Jun 8, 2021

When i try to format

await cursor.execute("SELECT * FROM settings WHERE userid = %s", (author.id))

It appears that

line 147, in mogrify
    query = query % self._escape_args(args, conn)
  File "/usr/lib/python3.9/site-packages/asyncmy/cursors.py", line 126, in _escape_args
    return conn.escape(args)
  File "asyncmy/connection.pyx", line 409, in asyncmy.connection.Connection.escape
  File "asyncmy/converters.pyx", line 10, in asyncmy.converters.escape_item
  File "asyncmy/converters.pyx", line 25, in asyncmy.converters.escape_item
  File "asyncmy/converters.pyx", line 48, in asyncmy.converters.escape_int
OverflowError: Python int too large to convert to C long

The value I want to format is 18 digits, the column has data type BIGINT. And sometimes I also need to format 18 digit values ​​for 3 primary keys.

@long2ice
Copy link
Owner

long2ice commented Jun 9, 2021

You can try latest dev branch

@ghost
Copy link
Author

ghost commented Jun 9, 2021

You can try latest dev branch

Yes, I have version 0.1.6

@long2ice
Copy link
Owner

long2ice commented Jun 9, 2021

Just install from source, which version is 0.1.7

@long2ice long2ice closed this as completed Jun 9, 2021
@ghost
Copy link
Author

ghost commented Jun 9, 2021

Thanks!

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