Skip to content
Advertisement

psycopg2: syntax error at or near “offset”, datetime object

I am running the following SQL query using Python and psycopg2 and is getting errors.

SQL query:

Errors:

Variables and their values

Python Functions:

How should i fix this?

Advertisement

Answer

I solved this issue by converting the values of in the list ['timestamps'] to str from datetime.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement