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

az acr login - NotImplementedError: APIVersion 2019-12-01-preview is not available #13927

Closed
ezwiefel opened this issue Jun 10, 2020 · 12 comments
Assignees

Comments

@ezwiefel
Copy link

This is autogenerated. Please review and update as needed.

Describe the bug

Logging into ACR isn't working due to API Version Error

Command Name
az acr login

Errors:

APIVersion 2019-12-01-preview is not available
Traceback (most recent call last):
python3.6/site-packages/knack/cli.py, ln 215, in invoke
    cmd_result = self.invocation.execute(args)
cli/core/commands/__init__.py, ln 654, in execute
    raise ex
cli/core/commands/__init__.py, ln 718, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
cli/core/commands/__init__.py, ln 711, in _run_job
    six.reraise(*sys.exc_info())
...
cli/command_modules/acr/_client_factory.py, ln 19, in cf_acr_registries
    return get_acr_service_client(cli_ctx).registries
azure/mgmt/containerregistry/container_registry_management_client.py, ln 208, in registries
    raise NotImplementedError("APIVersion {} is not available".format(api_version))
NotImplementedError: APIVersion 2019-12-01-preview is not available

To Reproduce:

  • az acr login -n {}

Expected Behavior

Environment Summary

Linux-4.15.0-1082-azure-x86_64-with-debian-stretch-sid
Python 3.6.9
Installer: PIP

azure-cli 2.6.0 *
azure-cli-ml 1.5.0

Extensions:
azure-cli-ml 1.5.0

Additional Context

@ghost ghost added the needs-triage This is a new issue that needs to be triaged to the appropriate team. label Jun 10, 2020
@ghost ghost added the question The issue doesn't require a change to the product in order to be resolved. Most issues start as that label Jun 10, 2020
@ghost ghost removed the needs-triage This is a new issue that needs to be triaged to the appropriate team. label Jun 10, 2020
@yonzhan yonzhan added the Service Attention This issue is responsible by Azure service team. label Jun 10, 2020
@ghost
Copy link

ghost commented Jun 10, 2020

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @toddysm, @yugangw-msft.

@yonzhan yonzhan removed the question The issue doesn't require a change to the product in order to be resolved. Most issues start as that label Jun 10, 2020
@yonzhan
Copy link
Collaborator

yonzhan commented Jun 10, 2020

acr

@jikuma
Copy link

jikuma commented Jun 13, 2020

@ezwiefel can you please help me with registry name and registry location. Does docker login work for you?

@ezwiefel
Copy link
Author

@jikuma I don't remember which registry name and location were causing the issues

@yugangw-msft yugangw-msft self-assigned this Jun 23, 2020
@yugangw-msft
Copy link
Contributor

yugangw-msft commented Jun 23, 2020

This is a setup issue, not ACR issue. In short, the azure-mgmt-containerregsitry was not installed correctly. @ezwiefel, please tell us how you installed the CLI.
@fengzhou-msft

@yugangw-msft yugangw-msft added Packaging and removed ACR Container Registry az acr Service Attention This issue is responsible by Azure service team. labels Jun 23, 2020
@yugangw-msft yugangw-msft removed their assignment Jun 23, 2020
@ezwiefel
Copy link
Author

@yugangw-msft I believe it was the default installation on the Azure Machine Learning Compute Instance

@fengzhou-msft
Copy link
Member

@ezwiefel can you run pip show azure-mgmt-containerregistry to check the version?

@harshbangad
Copy link

Hi, I get the same error during az acr login --name name while running it on jupyter terminal of my compute instance.
Any workaround?

@fengzhou-msft

Here is the version of container registry-
The
azureuser@dockertest4:/mnt/batch/tasks/shared/LS_root/mounts/clusters/dockertest4/code$ pip show azure-mgmt-containerregistry
Name: azure-mgmt-containerregistry
Version: 2.8.0
Summary: Microsoft Azure Container Registry Client Library for Python
Home-page: https://github.com/Azure/azure-sdk-for-python
Author: Microsoft Corporation
Author-email: azpysdkhelp@microsoft.com
License: MIT License
Location: /anaconda/envs/azureml_py36/lib/python3.6/site-packages
Requires: azure-common, msrest, msrestazure
Required-by: azureml-core, azure-cli

@azeltov
Copy link

azeltov commented Oct 13, 2020

This is still an issue on compute instances. I have it working on my mac. I tried update to latest az cli and az ml cli and also updating pip azure -mgmt-containerregistry and still have the same issue.
az acr login --name amldbxsummitf07c5365
The command failed with an unexpected error. Here is the traceback:

APIVersion 2019-12-01-preview is not available
Traceback (most recent call last):
File "/anaconda/envs/azureml_py36/lib/python3.6/site-packages/knack/cli.py", line 215, in invoke
cmd_result = self.invocation.execute(args)
File "/anaconda/envs/azureml_py36/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 654, in execute
raise ex
File "/anaconda/envs/azureml_py36/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 718, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
File "/anaconda/envs/azureml_py36/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 711, in _run_job
six.reraise(*sys.exc_info())
File "/anaconda/envs/azureml_py36/lib/python3.6/site-packages/six.py", line 703, in reraise
raise value
File "/anaconda/envs/azureml_py36/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 688, in _run_job
result = cmd_copy(params)
File "/anaconda/envs/azureml_py36/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 325, in call
return self.handler(*args, **kwargs)
File "/anaconda/envs/azureml_py36/lib/python3.6/site-packages/azure/cli/core/init.py", line 779, in default_command_handler
return op(**command_args)
File "/anaconda/envs/azureml_py36/lib/python3.6/site-packages/azure/cli/command_modules/acr/custom.py", line 236, in acr_login
password=password)
File "/anaconda/envs/azureml_py36/lib/python3.6/site-packages/azure/cli/command_modules/acr/_docker_utils.py", line 417, in get_login_credentials
is_login_context=True)
File "/anaconda/envs/azureml_py36/lib/python3.6/site-packages/azure/cli/command_modules/acr/_docker_utils.py", line 310, in _get_credentials
registry, resource_group_name = get_registry_by_name(cli_ctx, registry_name)
File "/anaconda/envs/azureml_py36/lib/python3.6/site-packages/azure/cli/command_modules/acr/_utils.py", line 107, in get_registry_by_name
client = cf_acr_registries(cli_ctx)
File "/anaconda/envs/azureml_py36/lib/python3.6/site-packages/azure/cli/command_modules/acr/_client_factory.py", line 19, in cf_acr_registries
return get_acr_service_client(cli_ctx).registries
File "/anaconda/envs/azureml_py36/lib/python3.6/site-packages/azure/mgmt/containerregistry/container_registry_management_client.py", line 208, in registries
raise NotImplementedError("APIVersion {} is not available".format(api_version))
NotImplementedError: APIVersion 2019-12-01-preview is not available

To open an issue, please run: 'az feedback'

@hermandr
Copy link

I would like to confirm that this is still an issue

@fengzhou-msft
Copy link
Member

Please try this workaround.

@yungezz
Copy link
Member

yungezz commented Mar 8, 2021

hi @ezwiefel does above solution work for you? let us know how it works. it's an issue of specific version of azure cli, fixed in latest releases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants