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
Initializing python supabase client with timeout does not work as displayed on website. #487
Comments
I figured a workaround:
Seems to solve the issue. Not sure if the website docs are out of date or maybe I'm still doing something wrong. |
Well while this works on my local machine, this does not run on an EC2 instance. Would love some assistance |
I experienced this problem too, and found that in addition to setting Oddly, while my python client uses the service_role API key, I needed to alter the Note also that after 360s the request will error with the message: |
Describe the bug
A clear and concise description of what the bug is.
I'm trying to set a timeout on the client (since i've been getting httpx read timeout errors).
This is as displayed on the website: https://supabase.com/docs/reference/python/initializing
To Reproduce
Steps to reproduce the behavior:
Put this code into a python file, and attempt to execute with current public pip3 install of supabase.
Expected behavior
I expected it to be a valid client instance and start to use it for my python script. Instead, I get this error:
Traceback (most recent call last):
File "/Users/XXXXX/Desktop/XXXXXX/XXXXXX/deployableApprovals.py", line 27, in
supabaseClient: Client = create_client(SUPABASEURL, SUPABASEKEY, {'timeout': 10})
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/supabase/client.py", line 248, in create_client
return Client(supabase_url=supabase_url, supabase_key=supabase_key, options=options)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/supabase/client.py", line 61, in init
options.headers.update(self._get_auth_headers())
AttributeError: 'dict' object has no attribute 'headers'
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: