as the title says, im using the supabase python library for a small project which requires me to update a table regularly.

i've set up this small test to construct an update function.

updatedtime = str(datetime.now()+timedelta(seconds=10))
    
update = sb.table("schedule").update({"scheduled_time": updatedtime}).eq("id", 1).execute()

if update:
    print("updated schedule!")
else:
    print("L")

running this returns: postgrest.exceptions.APIError: {'code': 'PGRST104', 'details': 'Failed to parse [("id","Filters.EQ.1")]', 'hint': None, 'message': 'Unexpected param or filter missing operator'}

i've learned this from a youtube tutorial, and as far as i know i've followed it pretty well.

does anyone know what's going on?

if anyone needs more context let me know.

2

There are 2 best solutions below

1
dangather On BEST ANSWER

i solved it. the postgrest python library defined the filters class as an enum (Lib/site-packages/postgrest/types.py), which returned the string "Filters.EQ" rather than just "eq", which is what produced the error. i turned it into a regular object and the only thing the request returns now is a 204 status code.

1
Delyanskiiii On

It seems to be a python 3.11.0 issue. Roll back to 3.10.9 and it works like a charm. For more information visit https://github.com/supabase-community/supabase-py/issues/377