KEMBAR78
Failed to call seek when a BlobReader instance initialized with raw_download parameter · Issue #1406 · googleapis/python-storage · GitHub
Skip to content

Failed to call seek when a BlobReader instance initialized with raw_download parameter #1406

@shunping

Description

@shunping

Environment details

  • OS type and version: MacOS
  • Python version: 3.10.16
  • pip version: 23.0.1
  • google-cloud-storage version: 2.19

Steps to reproduce

  1. See the following code

Code example

from google.cloud.storage import Blob
from google.cloud.storage import Bucket
from google.cloud.storage import Client

from google.cloud.storage.fileio import BlobReader

test_file="textio/textio-test-data.default.1k.txt"
client = Client("apache-beam-testing")
bucket = Bucket(client=client, name="apache-beam-samples")
blob = Blob(test_file, bucket=bucket)
reader = BlobReader(blob, raw_download=True)
reader.seek(0)

Stack trace

Traceback (most recent call last):
  File "PATH/gcs-client-bug.py", line 13, in <module>
    reader.seek(0)
  File "python/venv/lib/python3.10/site-packages/google/cloud/storage/fileio.py", line 181, in seek
    self._blob.reload(**self._download_kwargs)
TypeError: _PropertyMixin.reload() got an unexpected keyword argument 'raw_download'

Metadata

Metadata

Assignees

Labels

api: storageIssues related to the googleapis/python-storage API.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions