GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Storage list_blobs iterator doesn't return prefixes · Issue #1388 · googleapis/python-storage
This repository was archived by the owner on Mar 31, 2026. It is now read-only.
This repository was archived by the owner on Mar 31, 2026. It is now read-only.
Storage list_blobs iterator doesn't return prefixes #1388Copy link Copy link Closed Labels api: storageIssues related to the googleapis/python-storage API.priority: p3Desirable enhancement or fix. May not be included in next release.type: questionRequest for information or clarification. Not an issue. DescriptionTitle: list_blobs() iterator.prefixes returns empty when API response contains prefixes Issue DescriptionWhen using Reproduction StepsHere's a complete example using the public bucket from google.cloud import storage import logging # Set up logging to see API responses logging.basicConfig(level=logging.DEBUG) logger = logging.getLogger(__name__) # Initialize client and bucket client = storage.Client() bucket = client.bucket('gcp-public-data-landsat') prefix = "LC08/" # This prefix exists in the landsat bucket delimiter = "/" # First show that the raw API response contains prefixes logger.debug("\nChecking raw API response:") page = bucket.list_blobs(prefix=prefix, delimiter=delimiter)._get_next_page_response() logger.debug(f"Raw API response: {page}") # Shows prefixes exist # Now demonstrate that iterator.prefixes is empty logger.debug("\nTrying to iterate prefixes:") iterator = bucket.list_blobs(prefix=prefix, delimiter=delimiter) prefix_count = 0 for prefix in iterator.prefixes: prefix_count += 1 logger.debug(f"Found prefix: {prefix}") logger.debug(f"Total prefixes found: {prefix_count}") # Shows 0 # Also demonstrate list() returns empty prefixes = list(iterator.prefixes) logger.debug(f"List of prefixes: {prefixes}") # Shows [] Expected BehaviorThe iterator's .prefixes property should provide access to the prefixes returned in the API response Actual BehaviorThe raw API response shows prefixes exist: {'kind': 'storage#objects', 'prefixes': [...]} WorkaroundCurrently using direct access to the API response as a workaround: Environmentgoogle-cloud-storage version: 2.18.2 Related Issues This issue was co-authored by Claude. Activity
MetadataMetadataAssigneesLabelsapi: storageIssues related to the googleapis/python-storage API.priority: p3Desirable enhancement or fix. May not be included in next release.type: questionRequest for information or clarification. Not an issue. TypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |