question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:

  1. Have a blob container within a storage account that has hierarchical namespace enabled
  2. Have a blob within that container that is prefixed with at least one subdirectory (eg dir/blob.csv)
  3. Call .download_blob() and .readall() on the subdirectory, ie if you have a blob at dir/blob.csv, attempt to download and read just dir. Both the container_client.download_blob() method and the blob_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:closed
  • Created a year ago
  • Reactions:1
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
iscai-msftcommented, Aug 31, 2022

@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/1420

2reactions
jalauzon-msftcommented, Aug 31, 2022

Thanks @iscai-msft! I will work on re-generating the Storage packages with the latest autorest to address the issue before our next GA release.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found