#AttributeError

5 messages · Page 1 of 1 (latest)

muted pewter
#

Everytime I run an API call, its saying AttributeError: 'list' object has no attribute 'read'

openai.api_key = api_key
response = openai.Completion.create(
    model="text-davinci-003",
    prompt=(prompt),
    temperature=0.9
)

The error happens everytime this call is made.

chrome fossil
#

Remove the brackets from the prompt

ripe saffron
#

Not enough information to guess. You'd want to look at the call stack or get pycharm and set a break point so you can inspect the variable in memory that lacks the read attribute.

bold moth
muted pewter