API Connection Error

I keep getting this error:
Retrying llama_index.llms.openai.base.OpenAI._chat in xxx seconds as it raised APIConnectionError: Connection error…

Not sure why. I am able to access openai using langchain but get this error when using llama_index.llm per this course.

Have you tried the following:
import openai
openai.api_key = OPENAI_API_KEY

Yes, the issue persists

did you get your OpenAI API keys?? from the website openai?

I mean yes! I have no issues when using langchain but somehow I get this issue when using llamaindex

can you share a screenshot of the error sujit