I suspect it is related to this SO post). I'm running into this issue when trying to download blob files that are constantly being updated by another service (Azure Synapse), though it works fine on blob files in another container that is not being updated in the same way. Specifically, I suspect that there is a race condition such that if the blob is updated between the call to blob_instance.download_blob()
and data.chunks()
then the ETAG (or some other header) becomes invalid between the two calls.
facing "azure.core.exceptions.ResourceModifiedError: The condition specified using HTTP conditional header(s) is not met" while trying to download azure blobs using python.
Muhsin Muhammed
0
Reputation points
Hi,
I am trying to download blobs from my azure account using azure python SDK. I am using the chunks() method to download large sized blobs from containers. But I am facing the following error for large sized blobs.
I have also tried several other methods of downloading a blob like readinto(), downloadtostream etc. but everything returns the same error. Any kind of help or suggestions are appreciated.
The code I wrote is this :-
with open(download_file_path, "wb") as file:
data = blob_instance.download_blob()
for stream in data.chunks():
file.write(stream)
1 answer
Sort by: Most helpful
-
Jason Thorpe 5 Reputation points Microsoft Employee
2023-02-09T15:31:33.3466667+00:00