0

I am running the following command in my AML workspace in a jupyter notebook:

!az acr build --image mlnet --subscription $ws.subscription_id --registry $cr --file docker/Dockerfile docker/

The command fails with the following error:


APIVersion 2019-06-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 631, in execute
    raise ex
  File "/anaconda/envs/azureml_py36/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 695, 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 688, 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 665, in _run_job
    result = cmd_copy(params)
  File "/anaconda/envs/azureml_py36/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 324, in __call__
    return self.handler(*args, **kwargs)
  File "/anaconda/envs/azureml_py36/lib/python3.6/site-packages/azure/cli/core/__init__.py", line 565, in default_command_handler
    client = client_factory(cmd.cli_ctx, command_args) if client_factory else None
  File "/anaconda/envs/azureml_py36/lib/python3.6/site-packages/azure/cli/command_modules/acr/_client_factory.py", line 47, in cf_acr_runs
    return get_acr_service_client(cli_ctx, VERSION_2019_06_01_PREVIEW).runs
  File "/anaconda/envs/azureml_py36/lib/python3.6/site-packages/azure/mgmt/containerregistry/container_registry_management_client.py", line 246, in runs
    raise NotImplementedError("APIVersion {} is not available".format(api_version))
NotImplementedError: APIVersion 2019-06-01-preview is not available

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

How can I debug and get past this error?

1 Answers1

1

Looks like updating the cli version solves the issue. I faced the same issue. Upgraded azure cli version using the below command. After the upgrade acr commands worked fine.

pip install --upgrade azure-cli
fcdt
  • 2,371
  • 5
  • 14
  • 26