-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
TypeError: Client.__init__() got an unexpected keyword argument 'proxies' #1903
Comments
Same issue: |
duplicate |
What is the solution now? |
I directly commented out the proxies in the constructor of SyncHttpxClientWrapper in openai/_base_client.py, and it works properly now. |
@3218923350 , this worked for me: #1902 (comment) |
Updating to the latest |
Is this supposed to be fixed? I'm still seeing the 'proxies' issue when trying to update a container at AWS. I've updated to OpenAI 1.55.3, and my code does not use Httpx at all. I'm using the Async client.
|
Hey @bsenftner are you sure you're on the latest version? You can verify by running this command python -c 'import openai; print(openai.__version__)' |
Yes I am on the latest version. I log the OpenAI version via "RUN pip3 show openai" during container build, as well as
when my app starts up and both confirm version 1.55.3. |
@bsenftner Could you try to pin httpx to 0.27.2? That wouldn't explain why it doesn't work in your environment but would unblock you |
@dgellow I'm starting to think my pipeline may have some additional issue. I tried your suggestion of pinning httpx to 0.27.2 yesterday, and still saw the issue. Since that time my AWS specialist has been double checking things, so I'm trying the pinning of httpx to 0.27.2 again and will report back. No one else is seeing this, still, I guess? |
Looks like the pinning is working now. My local container builds have been working the entire time, so I suspect I need to examine my build & deploy pipeline at AWS. If it's only me, then it's only my issue. |
Based on the symptoms you're describing I suspect your docker image is using an old cache (i.e one of the layer comes from a cache instead of being rebuilt). But yes, so far you have been the only one reporting that issue. Glad you were able to make the pinning work :) |
We have already updated OpenAI using We resolved it by downgrading pip install openai "httpx[socks]" This installed the latest OpenAI version (1.56.0) as expected, but it still installed openai-python/requirements.lock Line 29 in 534d6c5
|
@ericzhou571 the Are you sure you're using the latest version? What does running this output? import openai
print(openai.__version__) |
我没有找到这个
|
Has this issue been fixed? still happening to me. |
@redhatpeter A workaround is to pin the httpx version to 0.27.2, you can see it described here: #1902 (comment) |
using autogen to create agents still having same issue |
Confirm this is an issue with the Python library and not an underlying OpenAI API
Describe the bug
SyncHttpxClientWrapper
has hard coded proxies but it no longer exists in httpx 0.28To Reproduce
pip install openai
openai.OpenAI(**client_params, **sync_specific)
Code snippets
OS
macOS
Python version
Python v3.11.4
Library version
openai 1.55.2
The text was updated successfully, but these errors were encountered: