Just a beginner with the python/postgres combo so forgive me if this is trivial. I'm executing a raw SQL query with sqlalchemy along the lines of:
SELECT * FROM table WHERE pk_table_id IN ()
For the example below I tried self.ids
as a tuple containing string or integers as well as an array containing string or integers. Either way it didn't work.
When I use this line:
my_connection.execute('SELECT * FROM public.table WHERE pk_table_id IN (%s)', self.ids)
I get the error:
TypeError: not all arguments converted during string formatting
Any suggestions?