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

OpenAI Client Initialization Fails Due to httpx 0.28 #19

Open
magajh opened this issue Feb 21, 2025 · 0 comments · May be fixed by #20
Open

OpenAI Client Initialization Fails Due to httpx 0.28 #19

magajh opened this issue Feb 21, 2025 · 0 comments · May be fixed by #20

Comments

@magajh
Copy link

magajh commented Feb 21, 2025

Description:
I encountered an issue while using the AI Coach XBlock in Sumac. When clicking the "Ask from coach" button, the request fails with the following error in the logs:

2025-02-20 21:17:58,842 ERROR 29 [ai_coach.ai_coach] [user 7] [ip 172.20.0.1] ai_coach.py:187 - 'dict' object has no attribute 'chat'

After debugging, I found that this happens because the OpenAI client fails to initialize, with the following error:

Client.__init__() got an unexpected keyword argument 'proxies'

It looks like this issue is caused by the httpx version 0.28, which removed the deprecated proxies argument
https://community.openai.com/t/error-with-openai-1-56-0-client-init-got-an-unexpected-keyword-argument-proxies/1040332/2
geekan/MetaGPT#1617

Temporary Solution:

As a workaround, I downgraded httpx to 0.27.2, and the XBlock is now working

@rehmansheikh222 rehmansheikh222 linked a pull request Feb 27, 2025 that will close this issue
@Danyal-Faheem Danyal-Faheem linked a pull request Feb 27, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant