-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Sample Code: OpenAI service failed to complete the prompt, APIConnectionError issue with Python 3.10 #627
Comments
Hello, I used Python 3.11.3 and it works. I didn't use venv but it does work. The issue you described is strange |
Have you solved the problem? I am having the same error. |
@alexchaomander can you take a look at this? |
@carterwilliamson are you still running into this issue? I was able to get it to work fine using my Python 3.10 environment |
I have the same problem. I'm currently using python 3.11.3, which doesn't work. |
Facing same issue with python 3.10 inside Codespaces for semantic kernel python notebooks, any fix ? |
Partly because of network problems, I switched to the Singapore server to work
阿生
***@***.***
Original Email
Sender:"PRIYA BHIMJYANI"< ***@***.*** >;
Sent Time:2023/5/18 18:07
To:"microsoft/semantic-kernel"< ***@***.*** >;
Cc recipient:"2662007798"< ***@***.*** >;"Comment"< ***@***.*** >;
Subject:Re: [microsoft/semantic-kernel] Sample Code: OpenAI service failed tocomplete the prompt, APIConnectionError issue with Python 3.10 (Issue #627)
Facing same issue with python 3.10 inside Codespaces for semantic kernel python notebooks, any fix ?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
If you are giving any org_id just comment it in the .env. It is optional. |
It turned to an issue with proxy for me. Setting the proxy via the environment variables - HTTP_PROXY and HTTPS_PROXY did not work. I had to set the proxy using the below way
|
I think I've run into the same SSL certificate something error on And found this solution on SO: bash /Applications/Python*/Install\ Certificates.command After restarting the Jupyter notebook kernel, things worked. |
I ran into the same issue. Thankfully this solution fixed it on my end. Is this problem specific to Macbooks or Windows as well? @JJDawn, @2662007798, @priya-27, @bingokunkun, and @dandv, are all y'all on Macbooks? |
@matthewbolanos Yes, I'm on Ventura 13.3.1(a). |
Yes, on a mac
…On Mon, 12 Jun 2023 at 5:48 PM, Matthew Bolaños ***@***.***> wrote:
I *think* I've run into the same SSL certificate something error.
And found this solution on SO
<https://stackoverflow.com/questions/42098126/mac-osx-python-ssl-sslerror-ssl-certificate-verify-failed-certificate-verify>
:
bash /Applications/Python*/Install\ Certificates.command
After restarting the Jupyter notebook kernel, things worked.
I ran into the same issue, but this solution fixed it on my end. Is this
problem specific to Macbooks or Windows as well? @JJDawn
<https://github.com/JJDawn>, @2662007798 <https://github.com/2662007798>,
@priya-27 <https://github.com/priya-27>, @bingokunkun
<https://github.com/bingokunkun>, and @dandv <https://github.com/dandv>,
are all y'all on Macbooks?
—
Reply to this email directly, view it on GitHub
<#627 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A2EQ7LGDGK5YPGAK33GOGMLXK4CLBANCNFSM6AAAAAAXKHBWYE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
no is windows |
Same error where identical code works on a PC but fails on my MacBook. (side by side test). The code is using the model as deployed in our Azure subscription. (AzureTextCompletion). fresh venv: Package Version aiofiles 23.1.0 |
Corrected on the Mac by upgrading python to version 3.11.4. All other packages previously stated remain as-is within the new virtual environment. |
I have the same issue on Debian 11, python 3.10.12: After checking ex.cause, I get the message: I finaly found that setup the environment variable SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt (for aiohttp) make it work |
Fixed on mac by running on Python 3.9 instead of 3.11. strange. |
This worked for me. It seems that semantic kernel isn't referencing the env variables, and you have to manually set them. |
We understand the issue is related to the virtual environment configuration. No changes to be made in the python SDK at present. |
Describe the bug
Unable to run the sample code here: https://github.com/microsoft/semantic-kernel/blob/main/python/README.md
To Reproduce
Steps to reproduce the behavior:
python -m venv venv
python -m pip install --upgrade semantic-kernel
.env
file following these instructions: https://github.com/microsoft/semantic-kernel/blob/main/python/README.md#openai--azure-openai-api-keysError: (<ErrorCodes.ServiceError: 6>, 'OpenAI service failed to complete the prompt', APIConnectionError(message='Error communicating with OpenAI', http_status=None, request_id=None))
Expected behavior
Expected to see output like
Robots must not harm humans.
Desktop (please complete the following information):
Additional context
Full error:
Error: (<ErrorCodes.ServiceError: 6>, 'OpenAI service failed to complete the prompt', APIConnectionError(message='Error communicating with OpenAI', http_status=None, request_id=None))
No VPN enabled. New virtual environment.
Tried with my personal account as well as my company account. Both had same result.
Tried on a VPN, no luck.
Edit:
I was able to run the sample in an AWS ec2 instance with python 3.9. I then tested on my machine with a python:3.9 docker container which also worked. This appears to be an issue with python 3.10.
The text was updated successfully, but these errors were encountered: