Error'openai' has no attribute 'error'

Hi All, I am getting below error using langchain with OpenAI key

AttributeError : module ‘openai’ has no attribute ‘error’

How to resolve this?

I am getting the same error. Downgrading openai to 0.28.0 version isn’t helping.
Please help.

hi… i got it resolved. check your file name where you are getting error. if its or or langchain.ipynb or even openai.ipynb … just change it to any other name than this. this helped me…


Thanks for clarifying , it worked indeed

Thank you. This actually works. Not sure why though.