0
When trying to run an update like the below in postgres
via psycopg2
of Python is giving the error:
psycopg2.Programmingerror: can’t Adapt type 'Dict'
I’m trying to run a code like this:
self.cursor.execute("UPDATE tb_games set infos_json = %s where id = %s", (json.dumps({'v1':'a','v2:'b'}), id_game))
conexao.commit()
My column infos_json
is the type json
, the dictionary I’m passing to json.dumps
is a valid dictionary, already I have JSON on code parsers and all right.