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: Client.__init__() got an unexpected keyword argument 'proxies' #249

Closed
1 task done
kartik7153 opened this issue Nov 29, 2024 · 2 comments · Fixed by #250
Closed
1 task done

[Bug]: TypeError: Client.__init__() got an unexpected keyword argument 'proxies' #249

kartik7153 opened this issue Nov 29, 2024 · 2 comments · Fixed by #250
Labels
auto:bug bug Something isn't working triage

Comments

@kartik7153
Copy link

Contact Details

No response

What happened?

A bug happened!

While initialising portkey client getting a error related to open client
Portkey Python Client verion - 1.9.6

Version

0.1.xx (Default)

Relevant log output

File "/deps/nebula/nebula/ba_agent/agent.py", line 25, in <module>
    portkey_client = PortkeyClient(os.getenv("PORTKEY_API_KEY"), "pc-anthro-6165b6")
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/deps/nebula/nebula/ba_agent/utils/portkey_client.py", line 23, in __init__
    self.portkey = Portkey(api_key=api_key, config=config_id)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/portkey_ai/api_resources/client.py", line 121, in __init__
    self.openai_client = OpenAI(
                         ^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/portkey_ai/_vendor/openai/_client.py", line 123, in __init__
    super().__init__(
  File "/usr/local/lib/python3.11/site-packages/portkey_ai/_vendor/openai/_base_client.py", line 843, in __init__
    self._client = http_client or SyncHttpxClientWrapper(
                                  ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/portkey_ai/_vendor/openai/_base_client.py", line 741, in __init__
    super().__init__(**kwargs)
TypeError: Client.__init__() got an unexpected keyword argument 'proxies'

Code of Conduct

  • I agree to follow this project's Code of Conduct
@kartik7153 kartik7153 added bug Something isn't working triage labels Nov 29, 2024
@dosubot dosubot bot added the auto:bug label Nov 29, 2024
@kartik7153
Copy link
Author

btw this is solved by locking httpx dependency explicitly

@csgulati09
Copy link
Collaborator

Hey!

Can I know now that you were able to fix it, what version of portkey sdk are you on and as well as for httpx?

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

Successfully merging a pull request may close this issue.

2 participants