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

Problem with NULL timestamps BUG #82

Open
BrandoDev opened this issue Dec 25, 2023 · 0 comments
Open

Problem with NULL timestamps BUG #82

BrandoDev opened this issue Dec 25, 2023 · 0 comments

Comments

@BrandoDev
Copy link

[2023-12-25 22:15:49] ERROR [pyrogram.dispatcher.handler_worker:253] Cannot convert str to datetime.date
Traceback (most recent call last):
File "asyncmy/converters.pyx", line 160, in asyncmy.converters.convert_datetime
ValueError: year 0 is out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "asyncmy/converters.pyx", line 270, in asyncmy.converters.convert_date
ValueError: invalid literal for int() with base 10: '00 00:00:00'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/pyrogram/dispatcher.py", line 240, in handler_worker
await handler.callback(self.client, *args)
File "/root/bot/tb_investing/userbot.py", line 167, in invia
await cur.execute("SELECT * FROM users WHERE invite_link_url = %s", (invite_link_url,))
File "asyncmy/cursors.pyx", line 179, in execute
File "asyncmy/cursors.pyx", line 364, in _query
File "asyncmy/connection.pyx", line 494, in query
File "asyncmy/connection.pyx", line 682, in _read_query_result
File "asyncmy/connection.pyx", line 1076, in read
File "asyncmy/connection.pyx", line 1147, in _read_result_packet
File "asyncmy/connection.pyx", line 1185, in _read_rowdata_packet
File "asyncmy/connection.pyx", line 1203, in asyncmy.connection.MySQLResult._read_row_from_packet
File "asyncmy/converters.pyx", line 134, in asyncmy.converters.convert_datetime
File "asyncmy/converters.pyx", line 162, in asyncmy.converters.convert_datetime
File "asyncmy/converters.pyx", line 272, in asyncmy.converters.convert_date
TypeError: Cannot convert str to datetime.date

Steps to reproduce:

Create a table with rows with a timestamp column set at 0, then fetch it

@BrandoDev BrandoDev reopened this Dec 25, 2023
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