Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When retrieving blobs : DeserializationError: Unable to deserialize to object: type, KeyError: 'name' #16250

Closed
tappoz opened this issue Jan 20, 2021 · 4 comments · Fixed by #16267
Assignees
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. Storage Storage Service (Queues, Blobs, Files)

Comments

@tappoz
Copy link

tappoz commented Jan 20, 2021

  • Package Name: azure-storage-blob
  • Package Version: 12.7.0
  • Operating System: Linux Ubuntu 20.04.1 LTS
  • Python Version: 3.6

Describe the bug

When using msrest-0.6.10 I am not able to retrieve blobs because an exception is being thrown by the library: DeserializationError: Unable to deserialize to object: type, KeyError: 'name'.

To Reproduce
Steps to reproduce the behavior:

Using ipython:

In [1]: from azure.storage.blob import BlobServiceClient, BlobClient                                                                                       

In [2]: ASA_CONNECTION_STRING = "DefaultEndpointsProtocol=https;BlobEndpoint=https://<<SOMETHING>>.blob.core.windows.net/;AccountName=<<SOMETHING>>;AccountKey=<<SOMETHING_ELSE>>"                                              

In [3]: ASA_CONTAINER_NAME = "<<SOME_NAME>>"                                                                                            

In [4]: blob = BlobServiceClient.from_connection_string(ASA_CONNECTION_STRING)                                                                             

In [5]: container = blob.get_container_client(ASA_CONTAINER_NAME)                                                                                          

In [6]: stuff = container.list_blobs()

In [7]: thing = stuff.next()

Expected behavior

That thing above should contain the details of the blob.

Additional context

For some reason if I uninstall all the pip packages containing the string "azure" with this:

for i in `pip list | awk '/azure/ {print $1}'`; do pip uninstall -y $i ; done

Then I remove this msrest package (version msrest-0.6.10) with:

pip uninstall msrest

Then I install again this package azure-storage-blob with:

pip install azure-storage-blob --upgrade

Then the code snippet above to retrieve a blob works.

The interesting fact is that this msrest is re-installed with the version msrest-0.6.19.
There must be something wrong with msrest-0.6.10 that is not captured by the requirements for azure-storage-blob.

@ghost ghost added needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Jan 20, 2021
@xiangyan99 xiangyan99 added bug This issue requires a change to an existing behavior in the product in order to be resolved. Client This issue points to a problem in the data-plane of the library. Storage Storage Service (Queues, Blobs, Files) labels Jan 20, 2021
@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Jan 20, 2021
@xiangyan99 xiangyan99 added needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. and removed question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Jan 20, 2021
@tasherif-msft tasherif-msft self-assigned this Jan 20, 2021
@tasherif-msft
Copy link
Contributor

Hi @tappoz,

We recently migrated our generated code layer to use a new version (of autorest). It appears this problem is due to an outdated minimum dependency!
msrest minimum dependency has now been updated to 0.6.18 to use Blobs/Fileshares/Queues/Datalake.
I will put out a PR to update this dependency :)
Thanks for catching this

@tasherif-msft
Copy link
Contributor

tasherif-msft commented Jan 20, 2021

I have created a PR here #16267. We will be patch releasing to resolve this issue. Let me know if anything else is needed :)

@tasherif-msft
Copy link
Contributor

@tappoz the patch has been released.

openapi-sdkautomation bot pushed a commit to AzureSDKAutomation/azure-sdk-for-python that referenced this issue Nov 1, 2021
[Hub Generated] Review request for Microsoft.PolicyInsights to add version stable/2021-10-01 (Azure#16250)

* Adds base for updating Microsoft.PolicyInsights from version stable/2019-07-01 to version 2021-10-01

* Updates readme

* Updates API version in new specs and examples

* Microsoft.PolicyInsights/remediations new API version: 2021-10-01

* Add Go tag

* Add Java tag

* Update specification/policyinsights/resource-manager/readme.md

Co-authored-by: Dapeng Zhang <ufo54153@gmail.com>

* Remove Go SDK generation flag

Co-authored-by: Dapeng Zhang <ufo54153@gmail.com>
@NebulusIO
Copy link

I'm running into a conflict after running both

pip install msrest==0.6.18
pip install msrest==0.6.21

i'm getting
Installing collected packages: msrest Attempting uninstall: msrest Found existing installation: msrest 0.6.10 Uninstalling msrest-0.6.10: Successfully uninstalled msrest-0.6.10 ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. botframework-connector 4.14.0 requires msrest==0.6.10, but you have msrest 0.6.21 which is incompatible. botbuilder-schema 4.14.0 requires msrest==0.6.10, but you have msrest 0.6.21 which is incompatible. Successfully installed msrest-0.6.21

msyyc pushed a commit that referenced this issue Dec 8, 2021
* CodeGen from PR 16250 in Azure/azure-rest-api-specs
[Hub Generated] Review request for Microsoft.PolicyInsights to add version stable/2021-10-01 (#16250)

* Adds base for updating Microsoft.PolicyInsights from version stable/2019-07-01 to version 2021-10-01

* Updates readme

* Updates API version in new specs and examples

* Microsoft.PolicyInsights/remediations new API version: 2021-10-01

* Add Go tag

* Add Java tag

* Update specification/policyinsights/resource-manager/readme.md

Co-authored-by: Dapeng Zhang <ufo54153@gmail.com>

* Remove Go SDK generation flag

Co-authored-by: Dapeng Zhang <ufo54153@gmail.com>

* version,CHANGELOG

Co-authored-by: SDKAuto <sdkautomation@microsoft.com>
Co-authored-by: Dapeng Zhang <ufo54153@gmail.com>
Co-authored-by: PythonSdkPipelines <PythonSdkPipelines>
hildurhodd pushed a commit to hildurhodd/azure-sdk-for-python that referenced this issue Jan 4, 2022
* CodeGen from PR 16250 in Azure/azure-rest-api-specs
[Hub Generated] Review request for Microsoft.PolicyInsights to add version stable/2021-10-01 (Azure#16250)

* Adds base for updating Microsoft.PolicyInsights from version stable/2019-07-01 to version 2021-10-01

* Updates readme

* Updates API version in new specs and examples

* Microsoft.PolicyInsights/remediations new API version: 2021-10-01

* Add Go tag

* Add Java tag

* Update specification/policyinsights/resource-manager/readme.md

Co-authored-by: Dapeng Zhang <ufo54153@gmail.com>

* Remove Go SDK generation flag

Co-authored-by: Dapeng Zhang <ufo54153@gmail.com>

* version,CHANGELOG

Co-authored-by: SDKAuto <sdkautomation@microsoft.com>
Co-authored-by: Dapeng Zhang <ufo54153@gmail.com>
Co-authored-by: PythonSdkPipelines <PythonSdkPipelines>
@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. Storage Storage Service (Queues, Blobs, Files)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants