我们能够导入azure.storage,但无法访问BlobService属性
该文档说要使用以下导入语句:
from azure.storage import BlobService
但这得到以下错误:
ImportError: cannot import name BlobService
我们尝试了以下方法:
import azure.storage
...
foo = azure.storage.BlobService(...)
但这收到以下错误:
AttributeError: ‘module’ object has no attribute ‘BlobService’
我们还使用“ azure.storage.blob”而不是“ azure.storage”尝试了上述所有方法
我们尝试更新azure-storage软件包,但它是最新的(版本0.30.0)
我们还尝试了卸载azure-storage并安装了整个azure软件包,但是得到了相同的结果。我们尝试同时使用pip和conda安装它们,但两次结果相同。
我知道输出表明该版本的azure.storage没有BlobService属性,但是文档明确指出要从那里导入。
如果要使用BlobService
,可以安装package azure.storage 0.20.0
,BlobService
该版本已存在。在最新的版本中azure.storage 0.30.0
,BlobSrvice被拆分为BlockBlobService, AppendBlobService, PageBlobService
对象,您可以使用BlockBlobService
replace BlobService
。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句