openai-python icon indicating copy to clipboard operation
openai-python copied to clipboard

partially initialized module 'openai' has no attribute 'Completion'

Open shelu16 opened this issue 1 year ago • 1 comments

python gpt2.py Traceback (most recent call last): File "D:\EVE_NG\gpt2.py", line 2, in import openai File "D:\EVE_NG\openai.py", line 8, in response = openai.Completion.create( ^^^^^^^^^^^^^^^^^ AttributeError: partially initialized module 'openai' has no attribute 'Completion' (most likely due to a circular import)

shelu16 avatar Dec 07 '22 05:12 shelu16

Hi @shelu16,

Can you tell me a bit more about how you've set up the openai package? We haven't heard this issue from other users and I can't reproduce this locally.

hallacy avatar Dec 11 '22 17:12 hallacy