File "/Users/env_file/lib/python3.8/site-packages/databases/core.py", line 218, in fetch_all
return await self._connection.fetch_all(self._build_query(query, values))
File "/Users/env_file/lib/python3.8/site-packages/databases/backends/postgres.py", line 144, in fetch_all
rows = await self._connection.fetch(query, *args)
File "/Users/env_file/lib/python3.8/site-packages/asyncpg/connection.py", line 420, in fetch
return await self._execute(query, args, 0, timeout)
File "/Users/env_file/lib/python3.8/site-packages/asyncpg/connection.py", line 1402, in _execute
result, _ = await self.__execute(
File "/Users/env_file/lib/python3.8/site-packages/asyncpg/connection.py", line 1411, in __execute
return await self._do_execute(query, executor, timeout)
File "/Users/env_file/lib/python3.8/site-packages/asyncpg/connection.py", line 1423, in _do_execute
stmt = await self._get_statement(query, None)
File "/Users/env_file/lib/python3.8/site-packages/asyncpg/connection.py", line 328, in _get_statement
statement = await self._protocol.prepare(stmt_name, query, timeout)
File "asyncpg/protocol/protocol.pyx", line 163, in prepare
asyncpg.exceptions.PostgresSyntaxError: syntax error at or near "$2"
Nb: It's not because of the value None, I tried the query by replacing other values but the same error.
Hai friends,
I am using
sqlalchemy core + databases
for building and executing query in my project.\ My steps to build the query is likeBut this throws an error
Nb: It's not because of the value
None
, I tried the query by replacing other values but the same error.