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

Bug: TypeError for Unexpected Keyword Argument 'proxy' in gotrue 2.9.1 with supabase-py 2.8.1 #949

Closed
2 tasks done
sivasai9849 opened this issue Oct 1, 2024 · 5 comments · Fixed by #950 or #951
Closed
2 tasks done
Labels
bug Something isn't working

Comments

@sivasai9849
Copy link

sivasai9849 commented Oct 1, 2024

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

I'm encountering a TypeError while using supabase-py 2.8.1 in combination with gotrue 2.9.1. The error message is as follows:

TypeError: Client.__init__() got an unexpected keyword argument 'proxy'

This occurs when trying to create a Supabase client using the create_client method. It seems to be related to a change introduced in gotrue 2.9.1.

To Reproduce

Steps to reproduce the behavior:

  1. Install the following package versions:
    pip install gotrue==2.9.1
    pip install supabase==2.8.1
  2. Attempt to create a Supabase client with the following code:
    from supabase import create_client, Client
    
    url = SUPABASE_URL
    key = SUPABASE_SECRET
    supabase: Client = create_client(url, key)
  3. The error TypeError: Client.__init__() got an unexpected keyword argument 'proxy' is raised.

Expected behavior

The Supabase client should initialize successfully without raising a TypeError.

Screenshots

![Screenshot of the error]Screenshot 2024-10-01 at 10 11 24 AM

System information

  • OS: macOS
  • Version of supabase-py: 2.8.1
  • Version of gotrue: 2.9.1
  • Python version: 3.10

Additional context

The issue does not occur when downgrading to gotrue 2.8.1, so this appears to be a bug related to the latest release of gotrue 2.9.1.

@sivasai9849 sivasai9849 added the bug Something isn't working label Oct 1, 2024
@CalvinL15
Copy link

CalvinL15 commented Oct 1, 2024

I can confirm that I am also facing the same issue, with Python 3.9. When using supabase-py 2.8.1 in combination with gotrue 2.8.1 and httpx 0.25.1, I faced TypeError: __init__() got an unexpected keyword argument 'socket_options' instead. supabase-py 2.8.1 finally worked with httpx also downgraded to 0.24.1, which is not ideal.

@silentworks
Copy link
Contributor

You need to upgrade your httpx to version 0.26 or a later version. This was a change added to httpx. We are going to release a new version of the library soon and set the minimal version to 0.26.

@elitebyte
Copy link

Still hitting this issue with:

supabase==2.9.1
gotrue==2.9.3
httpx==0.27.2
uvicorn==0.32.0

@amansingh0311
Copy link

upgrade or downgrade to supabase==2.9.0 --> it will work

@studentofcoding
Copy link

How to make it work on python 3.8

File "./main.py", line 80, in <module>
    supabase: Client = create_client(SUPABASE_URL, SUPABASE_KEY)
  File "/Users/gic_owner/miniforge3/lib/python3.8/site-packages/supabase/_sync/client.py", line 338, in create_client
    return SyncClient.create(
  File "/Users/gic_owner/miniforge3/lib/python3.8/site-packages/supabase/_sync/client.py", line 102, in create
    client = cls(supabase_url, supabase_key, options)
  File "/Users/gic_owner/miniforge3/lib/python3.8/site-packages/supabase/_sync/client.py", line 79, in __init__
    self.auth = self._init_supabase_auth_client(
  File "/Users/gic_owner/miniforge3/lib/python3.8/site-packages/supabase/_sync/client.py", line 250, in _init_supabase_auth_client
    return SyncSupabaseAuthClient(
  File "/Users/gic_owner/miniforge3/lib/python3.8/site-packages/supabase/_sync/auth_client.py", line 31, in __init__
    SyncGoTrueClient.__init__(
  File "/Users/gic_owner/miniforge3/lib/python3.8/site-packages/gotrue/_sync/gotrue_client.py", line 101, in __init__
    SyncGoTrueBaseAPI.__init__(
  File "/Users/gic_owner/miniforge3/lib/python3.8/site-packages/gotrue/_sync/gotrue_base_api.py", line 28, in __init__
    self._http_client = http_client or SyncClient(
TypeError: __init__() got an unexpected keyword argument 'proxy'

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

Successfully merging a pull request may close this issue.

6 participants