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

相关推荐
white-persist12 分钟前
MCP协议深度解析:AI时代的通用连接器
网络·人工智能·windows·爬虫·python·自动化
codists42 分钟前
2025年9月文章一览
python
语落心生1 小时前
FastDeploy SD & Flux 扩散模型边缘端轻量化推理部署实现
python
花生糖@1 小时前
ST-Raptor:无需微调,准确率超越 GPT-4o 的半结构化表格问答新范式
ai·gpt-4·st-raptor
java1234_小锋1 小时前
TensorFlow2 Python深度学习 - TensorFlow2框架入门 - 立即执行模式(Eager Execution)
python·深度学习·tensorflow·tensorflow2
宝桥南山1 小时前
Azure - 尝试创建并使用一下Azure AI Search
microsoft·微软·azure
王大傻09281 小时前
numpy -- 算术函数 reciprocal() 和 power() 简介
python·numpy
咕白m6251 小时前
Python 将 Excel 转换为图片:实现数据可视化
后端·python
深蓝电商API2 小时前
不止是 Python:聊聊 Node.js/Puppeteer 在爬虫领域的应用
爬虫·python·node.js
Autumn72992 小时前
【材料学python入门】conda、 jupyter、cpu、GPAW、wsl、ubuntu
python·jupyter·conda