-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Closed
Labels
ClientThis issue points to a problem in the data-plane of the library.This issue points to a problem in the data-plane of the library.StorageStorage Service (Queues, Blobs, Files)Storage Service (Queues, Blobs, Files)
Description
Seeing the following results with azure.storage.blob version 12.0.0b2
In [4]: url = "https://bryan.blob.core.windows.net/julia/foo.py" + AZ_SAS_TOKEN
In [5]: bc = BlobClient(url)
In [6]: bc.download_blob().content_as_bytes()
Out[6]: b'class Foo:\n pass\n\n\nclass Bar:\n pass\n\n\nclass Baz(object):\n pass\n'
In [7]: bc.download_blob(offset=0, length=5).content_as_bytes()
Out[7]: b'class '
In [8]: bc.download_blob(offset=5, length=5).content_as_bytes()
Out[8]: b' '
Noting the following unexpected behavior:
- The first case with
offset=0, length=5returnsb'class 'which has length 6 - The second case with
offset=5, length=5only returns one byte even though there are more than 5 bytes left in the file at that offset
Also there is a typo in the ValueError raised when a length is given without an offset:
raise ValueError("Offset value must not be None is length is set.")
I think that is meant to be "IF length is set" (or perhaps "when length is set")
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
ClientThis issue points to a problem in the data-plane of the library.This issue points to a problem in the data-plane of the library.StorageStorage Service (Queues, Blobs, Files)Storage Service (Queues, Blobs, Files)