Traceback (most recent call last):
File "/Users/Development/OpenAIFineTuning/myenv/bin/openai", line 8, in <module>
sys.exit(main())
~~~~^^
File "/Users/Development/OpenAIFineTuning/myenv/lib/python3.13/site-packages/openai/cli/_cli.py", line 129, in main
_main()
~~~~~^^
File "/Users/Development/OpenAIFineTuning/myenv/lib/python3.13/site-packages/openai/cli/_cli.py", line 179, in _main
http_client = httpx.Client(
proxies=proxies or None,
http2=can_use_http2(),
)
TypeError: Client.__init__() got an unexpected keyword argument 'proxies'
I’m seeing that other people got this same error but solved it by upgrading openai to v1.55.3.
However, I’ve tried with both v1.55.3 and v1.56 and I’m still getting the same error.
It is your environment: ill-advised Python 3.13, and deprecated method in the httpx library installed. It is no help that there is no requirements.txt in the python sdk repo, but a requirements.lock file has all pinned versions including the httpx past the deprecation employed.
The cli/_tools/fine_tunes.py hasn’t been touched for over a year. It will reject more valid training file than it would validate at this point.
(edit: the latest OpenAI Python client resolves this issue)
The issue is with the update of httpx to 0.28.
They removed the deprecated keyword proxies.
Until OpenAI pushes an update downgrade httpx to 0.27.2 to fix the issue.
Hey everyone,
None of the solution mentioned above is working for me I am using Google colab and working on quite a very important research project that is required to be completed ideally in next 12hours. Any other quick fixes that I may do?
I was not experiencing the issue last week but run into it this morning. Thanks for your post here! It works for me. I did not use the os.kill though…not sure if that’s a must step…
I tried downgrading the httpx library and upgrading the OpenAI library, but the issue persisted. What worked for me was creating a custom HTTP client to handle the proxies argument and assigning it to my OpenAI client:
import httpx
class CustomHTTPClient(httpx.Client):
def __init__(self, *args, **kwargs):
kwargs.pop("proxies", None) # Remove the 'proxies' argument if present
super().__init__(*args, **kwargs)
# my_class.py
class MyClass:
def __init__(self):
self.client = OpenAI(http_client=CustomHTTPClient())
If you are using pip, the unrestricted version dependencies of the openai wheel will overwrite the installed httpx. httpx has to come last or as a second pip run with “httpx<0.28”.
The proper replacement for proxies is either proxy or mount parameter.
‘ERROR: pip’s dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
jupyter-server 1.24.0 requires anyio<4,>=3.1.0, but you have anyio 4.7.0 which is incompatible.’
Anyone else have this issue?
Tried uninstalling anyio and reinstalling 3.7.0 but no luck