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

Errors on insert and update in certain situations #791

Open
miyayuu123 opened this issue May 6, 2024 · 1 comment
Open

Errors on insert and update in certain situations #791

miyayuu123 opened this issue May 6, 2024 · 1 comment
Assignees
Labels
needs repro The issue could not be reproduced

Comments

@miyayuu123
Copy link

Hello, I am experiencing irregular errors in a Python project using Supabase and would appreciate your advice.

Summary of the problem
When using the Supabase client to update the database and insert data, the process is successful at the start, but after multiple processes, when the same code is executed, an error occurs. The content of the code has not changed, only the position at which it is executed is different.

Error Details

Expecting value: line 1 column 1 (char 0)

At the start of processing, I can update the status of the models table and insert a new record in the results table.
However, if the same update and insert code is executed after multiple operations, an error will occur.

Code Abstraction Explanation
As shown in the following code snippet, we are using the Supabase client to perform database operations.

update_response = supabase.table("models").update({"status": "finished"}).eq("model_id", model_id).execute()
insert_response = supabase.table("results").insert({"model_id": model_id, "result": ""}).execute()

Tried Solution.
Checked error messages and status codes and logged API responses in detail.
Rechecked that environment variables were set correctly.
Checked transaction management and connection status.

Question
Are there any recommended troubleshooting steps in this situation? Also, any advice on a general approach to resolving this issue?
Any small tips are welcome. Best regards.

@miyayuu123 miyayuu123 added the bug Something isn't working label May 6, 2024
@silentworks
Copy link
Contributor

I cannot recreate the issue from the code provided. It's best to create a reproducible github repo with the issue so we can investigate this further.

@silentworks silentworks added needs repro The issue could not be reproduced and removed bug Something isn't working labels May 22, 2024
@silentworks silentworks self-assigned this May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs repro The issue could not be reproduced
Projects
None yet
Development

No branches or pull requests

2 participants