-
Notifications
You must be signed in to change notification settings - Fork 3.8k
RecursionError in openai\_utils\_proxy.py #906
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
Comments
Can you try installing the package from our |
@xuing I think this might be a PyCharm bug, I can't reproduce the issue using I can't see anything suspect in our code, the last stack before the recursion is this: while frame and isinstance(frame.f_locals.get('self'), PEP669CallbackBase): Coming from While the proxy class is a little non-standard, the issue here is coming from the fact that we're overriding |
@RobertCraigie I think what you're saying makes a lot of sense. It indeed might be an issue with pydev, considering it's an EAP version. I will switch versions to avoid this bug and then see if I can provide feedback to Thank you for your attempts and explanation. By the way, the just-released RC version also has the same issue. |
@xuing if you've opened a ticket in JetBrains support, can you send me the link to it? I am facing the exact same issue. |
|
same issue again with latest paycharm Runtime version: 17.0.9+7-b1087.9 amd64 |
We've added a workaround that will fix this in the next release! I'd still strongly encourage the PyCharm folks to fix this on their end as well. Note that PyCharm's debugger will attempt to call our module level client as well which can result in an error if the |
Confirm this is an issue with the Python library and not an underlying OpenAI API
Describe the bug
A RecursionError is encountered when debugging a Python script that includes import openai in PyCharm.
The specific error occurs within the openai library's _utils_proxy.py file, involving the get_proxied and getattr methods.
The error message is as follows:
This error is triggered upon initiating the PyCharm debugger to debug the script.
stack trace:
To Reproduce
<python_executable> -X pycache_prefix=<cache_directory> <pydevd_path> --multiprocess --qt-support --client <client_ip> --port <port> --file test.py
Code snippets
OS
Windows11
Python version
Python 3.12.0
Library version
1.3.6
The text was updated successfully, but these errors were encountered: