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

ML: cli.azure.cli.core.azclierror: Met error <class 'TypeError'>:'SASCredentialDto' object is not subscriptable #6268

Open
KMoraz opened this issue May 7, 2023 · 11 comments
Labels
Auto-Assign Auto assign by bot bug This issue requires a change to an existing behavior in the product in order to be resolved. extension/ml Machine Learning Service Attention This issue is responsible by Azure service team.

Comments

@KMoraz
Copy link

KMoraz commented May 7, 2023

This is autogenerated. Please review and update as needed.

Describe the bug

Command Name
az ml model download Extension Name: ml. Version: 2.16.0.

Errors:

cli.azure.cli.core.azclierror: Met error <class 'TypeError'>:'SASCredentialDto' object is not subscriptable
az_command_data_logger: Met error <class 'TypeError'>:'SASCredentialDto' object is not subscriptable

To Reproduce:

Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

  • az ml model download --name {} --version {} --registry-name {} -w {} --debug

Expected Behavior

Environment Summary

Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.35, CBL-Mariner/Linux
Python 3.9.14
Installer: RPM

azure-cli 2.48.1

Extensions:
azure-devops 0.26.0
ml 2.16.0

Dependencies:
msal 1.20.0
azure-mgmt-resource 22.0.0

Additional Context

@ghost ghost added Auto-Assign Auto assign by bot CXP Attention This issue is handled by CXP team. Machine Learning labels May 7, 2023
@yonzhan
Copy link
Collaborator

yonzhan commented May 7, 2023

Thank you for opening this issue, we will look into it.

@ghost ghost added the extension/ml label May 7, 2023
@navba-MSFT navba-MSFT self-assigned this May 12, 2023
@navba-MSFT
Copy link
Contributor

@KMoraz Apologies for the late reply. Thanks for reaching out to us and reporting this issue. Could you please share the--debugoutput while running the above command ?

@KMoraz
Copy link
Author

KMoraz commented May 12, 2023

@navba-MSFT sure: ml.out.txt

@navba-MSFT
Copy link
Contributor

@KMoraz Thanks for the debug output. We are looking into this internally.

@eddmik
Copy link

eddmik commented May 17, 2023

I managed to fix this by downgrading the ml extension version by
az extension add --name ml --version 2.15.1

@KMoraz
Copy link
Author

KMoraz commented May 17, 2023

@eddmik yes, we also did the same

@navba-MSFT navba-MSFT added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label May 19, 2023
@uberj
Copy link

uberj commented Sep 22, 2023

Also hitting this issue... cannot download models.

@uberj
Copy link

uberj commented Sep 22, 2023

Looks like an API was updated to use attribute references rather than dict lookups. Here is a patch to fix the issue for "ml": "2.20.0"

--- /home/uberj/anaconda3/envs/<project>/lib/python3.8/site-packages/azure/ai/ml/_utils/_registry_utils.py     2023-09-22 12:42:24.691203253 -0700
+++ /home/uberj/_registery_utils.py     2023-09-22 12:43:05.731422505 -0700
@@ -173 +173 @@
-    if sas_uri.blob_reference_for_consumption.credential["credentialType"] == "NoCredentials":
+    if sas_uri.blob_reference_for_consumption.credential.credential_type == "NoCredentials":
@@ -176 +176 @@
-    return sas_uri.blob_reference_for_consumption.credential["sasUri"], "SAS"
+    return sas_uri.blob_reference_for_consumption.credential.sas_uri, "SAS"

@uberj
Copy link

uberj commented Sep 22, 2023

I just reviewed Azure/azure-sdk-for-python#30395 and it has the same patch. Can it be merged so this can be resolved?

@PramodValavala-MSFT PramodValavala-MSFT added Service Attention This issue is responsible by Azure service team. and removed CXP Attention This issue is handled by CXP team. labels Sep 28, 2023
@navba-MSFT navba-MSFT removed their assignment Oct 3, 2023
@navba-MSFT
Copy link
Contributor

Service team is involved to look into this.

@monuminu
Copy link

Is this issue fixed ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Assign Auto assign by bot bug This issue requires a change to an existing behavior in the product in order to be resolved. extension/ml Machine Learning Service Attention This issue is responsible by Azure service team.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants