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,问题就解决了。

相关推荐
2501_941877981 分钟前
从调用链到因果关系的互联网工程语法重构与多语言实践随笔分享
开发语言·python
王大锤439110 分钟前
基于Dify+数据库+Echarts搭建的数据可视化助手(含自然语言转SQL)
ai
CodeCaptain12 分钟前
win10 本地局域网内下载Qwen3Guard-Gen-8B模型并配置到dify的步骤
经验分享·ai·dify
loong_XL13 分钟前
大模型JSON格式输出:instructor
ai·大模型·llm·json
天天进步201514 分钟前
Python全栈项目--基于Django的项目管理系统
开发语言·python·django
no245441015 分钟前
移动、联通押注下一代“手机”
人工智能·ai·智能手机
小北方城市网16 分钟前
第 3 课:微服务架构设计与服务治理|从分布式到微服务的进阶实战
开发语言·人工智能·分布式·python·微服务·架构·geo
搞全栈小苏17 分钟前
【Python 爬虫实战】一键批量下载 Python 官网 FTP 所有版本全部文件(多线程 + 断点续传 + 禁用系统代理 完整版)
开发语言·爬虫·python
wyw000023 分钟前
PyTorch 模型量化完整实操步骤(工业级落地版)
人工智能·pytorch·python