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

题意 :访问 Python 中 openai 模块的一个不存在的属性 error

问题背景:

I'm running a Python summarizer in Azure ML that queries my gpt4 deployment for information. Everything was working fine until two days ago, when I decided to switch the output directory of the summaries to a different blob storage. Since then I am strangely getting the above error. My openAI version is 1.3.3 and langchain 0.0.301, and python 3.8. I have looked this up online and downgraded the version of openAI but it doesn't help. I've also tried the solutions here AttributeError: module 'openai' has no attribute 'error' - #8 by atseptember - API - OpenAI Developer Forum

我正在Azure ML中运行一个Python摘要器,该摘要器查询我的gpt4部署以获取信息。一切工作正常,直到两天前您决定将摘要的输出目录更改为另一个Blob存储。自那以后,我遇到了上述奇怪的错误。我当前使用的openAI版本是1.3.3,langchain是0.0.301,Python版本是3.8。我已经在线查找并尝试降级openAI版本,但问题仍未解决。我还尝试了这里提供的解决方案。

AttributeError: module 'openai' has no attribute 'error' - #8 by atseptember - API - OpenAI Developer Forum

but none have worked for me. Has anyone else also faced this?

但是都没有对我有用。其他人也遇到过这种情况吗?

I tried downgrading OpenAI and langchain Python libraries. I deleted the repo clone and AzureML notebook and made everything from scratch multiple times. This was working perfectly just two days ago and now it doesn't.

我尝试降级了OpenAI和langchain的Python库。我删除了仓库克隆和AzureML笔记本,并多次从头开始重新创建所有内容。就在两天前,这一切还运行得非常好,但现在不行了。

问题解决:

I also got the same error and i downgraded openai version to 0.27.4 and it worked

我也遇到了同样的错误,然后我将openai的版本降级到0.27.4,问题就解决了。

相关推荐
数据小小爬虫1 分钟前
如何使用Python爬虫按关键字搜索AliExpress商品:代码示例与实践指南
开发语言·爬虫·python
martian66524 分钟前
第17篇:python进阶:详解数据分析与处理
开发语言·python
无码不欢的我28 分钟前
使用vscode在本地和远程服务器端运行和调试Python程序的方法总结
ide·vscode·python
五味香29 分钟前
Java学习,查找List最大最小值
android·java·开发语言·python·学习·golang·kotlin
金融OG35 分钟前
99.8 金融难点通俗解释:净资产收益率(ROE)
大数据·python·线性代数·机器学习·数学建模·金融·矩阵
fmdpenny1 小时前
Django的安装
后端·python·django
小爬菜1 小时前
Django学习笔记(启动项目)-03
前端·笔记·python·学习·django
陈钇钇1 小时前
持续升级《在线写python》小程序的功能,文章页增加一键复制功能,并自动去掉html标签
python·小程序·html
didiplus1 小时前
告别手动编辑:如何用Python快速创建Ansible hosts文件?
网络·python·ansible·hosts