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

Cannot get past this empty error #790

Closed
heymarkreeves opened this issue May 5, 2024 · 1 comment
Closed

Cannot get past this empty error #790

heymarkreeves opened this issue May 5, 2024 · 1 comment
Assignees
Labels
invalid This doesn't seem right

Comments

@heymarkreeves
Copy link

heymarkreeves commented May 5, 2024

Bug report

Describe the bug

Trying to execute a simple select query using Python 3.12 or 3.9. I cannot get past this error.

To Reproduce

Python 3.12.3 (main, Apr  9 2024, 08:09:14) [Clang 15.0.0 (clang-1500.3.9.4)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from supabase import create_client, Client
>>> from supabase.lib.client_options import ClientOptions
>>> url: str = "https://svyjpvnhftybdowglgmt.supabase.co/rest/v1/iot"
>>> key: str = "OMITTED"
>>> client_options = ClientOptions(postgrest_client_timeout=999999, schema="public")
>>> supabase: Client = create_client(url, key, client_options)
>>> print(supabase.table("iot").select("id").execute())
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/markreeves/.local/share/virtualenvs/vercel-tidbyt-35n3k3fp/lib/python3.12/site-packages/postgrest/_sync/request_builder.py", line 78, in execute
    raise APIError(r.json())
postgrest.exceptions.APIError: {}
>>> print(supabase)
<supabase._sync.client.SyncClient object at 0x1043c5a30>
>>> print (supabase.table("iot").select("id"))
<postgrest._sync.request_builder.SyncSelectRequestBuilder object at 0x1063f7fe0>

I've tried using postgrest directly too, receive the same error. Same happens with select("*").

Expected behavior

It works in RapidAPI or using requests to simply fetch my project URL, so it's not a permissions issue. I expect to not get an error using the documented methods.

System information

  • OS: macOS
  • Version of supabase-py: 2.4.5
@heymarkreeves heymarkreeves added the bug Something isn't working label May 5, 2024
@silentworks
Copy link
Contributor

Your URL is incorrect, it should only be the base url and not the path to the endpoint. You have https://svyjpvnhftybdowglgmt.supabase.co/rest/v1/iot as your url when it should be https://svyjpvnhftybdowglgmt.supabase.co/.

@silentworks silentworks self-assigned this May 21, 2024
@silentworks silentworks added invalid This doesn't seem right and removed bug Something isn't working labels May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants