You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TypeError: Client.__init__() got an unexpected keyword argument 'proxies'
In colab notebooks adalflow library's OpenAIClient still attempting to pass the proxies keyword argument during the initialization of the OpenAI client from the openai library. Newer versions of the openai library have removed the proxies argument from their Client.init method. The problem is with the new version of the httpx library which openai and other clients use
The solution is downgrading httpx but doing just that causes dependency conflicts so what we need to do is update multiple packages and versions.
Bug Hypothesis: Dependency Conflict Resolution in Different Environments
Observed Behavior:
Local environment: Code works fine with:
anyio 4.4.0
httpx 0.27.0
httpx-sse 0.4.0
jupyter-server 2.14.2
jupyter-server-terminals 0.5.2
Colab environment: Code fails with dependency conflict requiring manual downgrade
Root Cause Analysis:
The core issue appears to be version mismatching between environments. While the local setup uses a newer jupyter-server (2.14.2) that's compatible with anyio 4.x, Colab is locked to an older jupyter-server version (1.24.0) that explicitly requires anyio < 4.0.
Supporting Evidence:
Local environment shows newer versions working harmoniously (jupyter-server 2.14.2)
The fix (downgrading anyio and then installing httpx) works consistently in Colab
Conclusion:
This isn't actually a bug in the code, but rather an environment-specific dependency constraint. The local environment's newer jupyter-server version allows for newer anyio versions, while Colab's older jupyter-server forces us to maintain compatibility with older anyio versions.
Solution is to add these commands after installing adalflow
fm1320
changed the title
TypeError: Client.__init__() got an unexpected keyword argument 'proxies'
TypeError: Client.__init__() got an unexpected keyword argument 'proxies' [Google Colab]
Dec 17, 2024
Bug description
TypeError: Client.__init__() got an unexpected keyword argument 'proxies'
In colab notebooks adalflow library's OpenAIClient still attempting to pass the proxies keyword argument during the initialization of the OpenAI client from the openai library. Newer versions of the openai library have removed the proxies argument from their Client.init method. The problem is with the new version of the httpx library which openai and other clients use
The solution is downgrading httpx but doing just that causes dependency conflicts so what we need to do is update multiple packages and versions.
Bug Hypothesis: Dependency Conflict Resolution in Different Environments
Observed Behavior:
Local environment: Code works fine with:
Colab environment: Code fails with dependency conflict requiring manual downgrade
Root Cause Analysis:
The core issue appears to be version mismatching between environments. While the local setup uses a newer jupyter-server (2.14.2) that's compatible with anyio 4.x, Colab is locked to an older jupyter-server version (1.24.0) that explicitly requires anyio < 4.0.
Supporting Evidence:
Conclusion:
This isn't actually a bug in the code, but rather an environment-specific dependency constraint. The local environment's newer jupyter-server version allows for newer anyio versions, while Colab's older jupyter-server forces us to maintain compatibility with older anyio versions.
Solution is to add these commands after installing adalflow
What version are you seeing the problem on?
How to reproduce the bug
Error messages and logs
Environment
More info
The problem persists for at least but not limited to:
OpenAI and Groq client
The text was updated successfully, but these errors were encountered: