Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Error in $: not enough input' on .update() #30

Closed
rphly opened this issue May 31, 2021 · 12 comments
Closed

'Error in $: not enough input' on .update() #30

rphly opened this issue May 31, 2021 · 12 comments
Labels
bug Something isn't working

Comments

@rphly
Copy link

rphly commented May 31, 2021

Bug report

To Reproduce

res = db.table(table_name).update({"notes": notes}).eq("id", user_id).execute()

Expected behavior

Update and return me the row.

Actual behaviour

{'data': {'message': 'Error in $: not enough input'}, 'status_code': 400}

System information

  • Version of supabase-py: 0.0.2
@rphly rphly added the bug Something isn't working label May 31, 2021
@rphly
Copy link
Author

rphly commented May 31, 2021

Temporary workaround is to use .insert() with upsert=True

@fedden
Copy link
Member

fedden commented Jun 7, 2021

Yes noticing this too. Is upsert actually working or is it simply inserting a new row? From what I've noticed it's inserting new rows so would be helpful to get confirmation thats what you are seeing. Perhaps request headers/jwt is misconfigured somehow..

@rphly
Copy link
Author

rphly commented Jun 8, 2021

@fedden it updates the row when I use insert with upsert=true.

To be clear, I don't think partial updates work.
What I'm doing is editing parts of the row and then executing db.table("notes").insert(data, upsert=True)

Think PUT not PATCH

@remybroun
Copy link

It would be nice to have this documented somewhere. Without this issue there is no way to know how to update a row.

@J0
Copy link
Collaborator

J0 commented Oct 30, 2021

Hey @remybroun @rphly,

We have tested this issue and it seems to work fine now. We are closing this for now but please feel free to let us know if you're still facing any issues.
image

Thanks!

@J0 J0 closed this as completed Oct 30, 2021
@krishnerkar
Copy link

krishnerkar commented Nov 1, 2021

Hey @remybroun @rphly,

We have tested this issue and it seems to work fine now. We are closing this for now but please feel free to let us know if you're still facing any issues. image

Thanks!

I am still facing the same issue :(

res = supabase.table("Servers").update({"Server_ID" : "test-id, "Server_Name" : "test-server,"Channel_ID" : "test-channel", }).execute()

image

@dreinon
Copy link
Contributor

dreinon commented Nov 19, 2021

Make sure to update your supabase version to the latest and tell us if you still face the issue please 😊
@Krish-Nerkar

@mohnish7
Copy link
Contributor

mohnish7 commented Mar 21, 2022

Hello @dreinon - I am running into the same issue again despite having the latest supabase version.

I am trying to update a single column using id as the matching value. My id is stored in uuid format and is generated using uuid_generate_v4()

supabase_client.table("table").update({"field": "True"}).eq("id", str(local_data.iloc[x]['id'])).execute()

@smandava98
Copy link

I recently faced this issue. If anyone comes across this again this was how I solved it:
I was using supabase-py instead of supabase. Also I updated supabase to latest version (1.0.3 as of this date) and my python version was 3.10.10.

@Bobbyjsx
Copy link

@smandava98 how were you able to use supabase in a python project without using supabase-py ??

@alananisimov
Copy link

@smandava98 how were you able to use supabase in a python project without using supabase-py ??

You can try pip install supabase and you will have no errors))))

@AkashC-goML
Copy link

if you are using supabase_py or supabase-py instead use supabase alone to create client

it is working for me any more issues add a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests