更新时间:2023-02-14 22:21:20
如果网络连接不稳定,可能会发生此问题, 或者未定义重试。
我建议您查看以下文档以创建重试政策: https://github.com/Azure/azure-storage-python/blob/master/samples/advanced/client.py#L33
A l l l我建议检查例外情况(如果容器名称确实存在与否)。
This issue could occur if network connectivity is not stable, or the retries are not defined.
I'd recommend checking the following documentation to create the retry policy: https://github.com/Azure/azure-storage-python/blob/master/samples/advanced/client.py#L33
Also I would recommend to check for exceptions(if container name actually exists or not).
您可以查看此 repo 以获取此示例:
You can check this repo for this example:
def list_blobs(container):
try:
global blob_list
content = block_blob_service.list_blobs(container)
print("******Blobs currently in the container:**********")
for blob in content:
blob_list.append(blob.name)
print(blob.name)
except:
print("The specified container does not exist, Please check the container name or if it exists.")
list_blobs(container)