I got error while running python code in MacOS, with openAI package upgrade already to the latest version. The last version of openai package does not have this issue.
openai.api_key = “openai-key”
that could be giving u problems it can create pylons problems and syntax errors
tho if u post the full script we could probly help alittle more
Make sure there’s no file named openai.py other than the module.
Also share the stack trace for this error. It’ll look like this:
Traceback (most recent call last):
File "example.py", line 7, in <module>
result = divide(5, 0)
File "example.py", line 2, in divide
return a / b
ZeroDivisionError: division by zero