I'm trying to get the count if items in my container and I'm getting an error:
InvalidChunkLength(got length b'', 0 bytes read
code:
from azure.storage.blob import ContainerClient
import requests
# Set the SAS URI for your Azure Blob container
sas_uri = "*************************"
# Create a ContainerClient object using the SAS URI
container_client = ContainerClient.from_container_url(sas_uri)
# Get the count of blobs in the container
blobs_count = sum(1 for _ in container_client.list_blobs())
# Display the count of blobs
print("Number of blobs in the container:", blobs_count)
I'm thrown with this error:
Unable to stream download: ("Connection broken: InvalidChunkLength(got length b'', 0 bytes read)", InvalidChunkLength(got length b'', 0 bytes read))
I don't know what to do.