Uncatchable error message printed when downloading blob that is an HN directory
See original GitHub issue- Package Name: azure-storage-blob
- Package Version: v12.13.1 (latest)
- Operating System: Don’t believe OS specific
- Python Version: 3.9 but don’t believe python version specific
Describe the bug
When calling download_blob().read_all()
on a blob that is actually a directory with hierarchical namespace enabled, the following error message is printed out:
Ran into a deserialization error. Ignoring since this is failsafe deserialization
Traceback (most recent call last):
File "/home/vscode/.local/lib/python3.9/site-packages/msrest/serialization.py", line 1509, in failsafe_deserialize
return self(target_obj, data, content_type=content_type)
File "/home/vscode/.local/lib/python3.9/site-packages/msrest/serialization.py", line 1375, in __call__
data = self._unpack_content(response_data, content_type)
File "/home/vscode/.local/lib/python3.9/site-packages/msrest/serialization.py", line 1543, in _unpack_content
raise ValueError("This pipeline didn't have the RawDeserializer policy; can't deserialize")
ValueError: This pipeline didn't have the RawDeserializer policy; can't deserialize
This error message cannot be caught, or silenced, and is very non-descriptive of the issue that is happening.
To Reproduce Steps to reproduce the behavior:
- Have a blob container within a storage account that has hierarchical namespace enabled
- Have a blob within that container that is prefixed with at least one subdirectory (eg
dir/blob.csv
) - Call
.download_blob()
and.readall()
on the subdirectory, ie if you have a blob atdir/blob.csv
, attempt to download and read justdir
. Both thecontainer_client.download_blob()
method and theblob_client.download_blob()
method are impacted by this. Note that.readall()
must also be called, and actually succeeds, but the error message is printed and unstoppable.
Expected behavior A catchable error/exception, and preferably a more descriptive message. Or, no error message at all and the existing implementation of empty bytes are returned.
Additional context
Note that the actual .readall()
method succeeds regardless, and returns empty bytes. It is just that the error message cannot be silenced.
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:6 (4 by maintainers)
Top Results From Across the Web
NoMemoryError when downloading Azure Blob in Ruby
The problem is that get_blob has to load the data into memory at once rather than streaming it to disk. In Chef we...
Read more >Failed to Download From Blobstorage
According to the error message that you mentioned, it seems to tell that you do not have sufficient permission to access the blob...
Read more >Canon mp252 driver - helalu.com
Update your Canon mp250 Drivers to prevent errors and problems with your Canon device. IMPORTANT NOTICE: Downloading the latest Driver ...
Read more >709986 - Can't download blob URLs - chromium - Monorail
Safari on iOS 10.3.2 opens the blob and allows it to be downloaded (although the filename is unknown). Firefox shows an error message....
Read more >downloadjs - npm
It specifies the contents and name of a new file placed in the browser's download directory. The input can be a URL, String,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@jalauzon-msft I just released autorest version
6.1.4
. This error will not be logged at the debug level, so only users who are doing debug level of logging will see this error. This should clear up the main issue where end users are seeing confusing logs. There is a separate issue about how we should actually deserialize the streamed error response, see here https://github.com/Azure/autorest.python/issues/1420Thanks @iscai-msft! I will work on re-generating the Storage packages with the latest autorest to address the issue before our next GA release.