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.

AZ ACR TASK CREATION ERROR: Traceback (most recent call last):

See original GitHub issue
Traceback (most recent call last):
  File "/opt/az/lib/python3.6/site-packages/knack/cli.py", line 215, in invoke
    cmd_result = self.invocation.execute(args)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 654, in execute
    raise ex
  File "/opt/az/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 "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 711, in _run_job
    six.reraise(*sys.exc_info())
  File "/opt/az/lib/python3.6/site-packages/six.py", line 703, in reraise
    raise value
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 688, in _run_job
    result = cmd_copy(params)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 325, in __call__
    return self.handler(*args, **kwargs)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/__init__.py", line 545, in default_command_handler
    return op(**command_args)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/acr/task.py", line 200, in acr_task_create
    task_create_parameters=task_create_parameters)
  File "/opt/az/lib/python3.6/site-packages/azure/mgmt/containerregistry/v2019_06_01_preview/operations/_tasks_operations.py", line 265, in create
    **operation_config
  File "/opt/az/lib/python3.6/site-packages/azure/mgmt/containerregistry/v2019_06_01_preview/operations/_tasks_operations.py", line 215, in _create_initial
    raise models.ErrorResponseException(self._deserialize, response)
azure.mgmt.containerregistry.v2019_06_01_preview.models._models_py3.ErrorResponseException: Operation returned an invalid status code 'Not Found'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/az/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/opt/az/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/__main__.py", line 44, in <module>
    exit_code = cli_main(az_cli, sys.argv[1:])
  File "/opt/az/lib/python3.6/site-packages/azure/cli/__main__.py", line 31, in cli_main
    return cli.invoke(args)
  File "/opt/az/lib/python3.6/site-packages/knack/cli.py", line 226, in invoke
    exit_code = self.exception_handler(ex)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/__init__.py", line 106, in exception_handler
    return handle_exception(ex)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/util.py", line 94, in handle_exception
    error = response_dict['error']
TypeError: string indices must be integers

WHILE CREATING ACR TASKER

az acr task create --registry stagingregistry --name staging --image rstagingregistry.azurecr.io/rstage:{{.Run.ID}} --image stagingregistry.azurecr.io/stage:latest --context https://github.com/SANDEEP/STAGING-app.git#Devops --file Dockerfile --git-access-token xyz

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:13 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
huanwucommented, Jul 9, 2020

@sandeepmindwave , thanks for the report. To make it work, you need enable either the commit-trigger or base-image trigger when using the git-access-token. It works if adding “–commit-trigger-enabled false --base-image-trigger-enabled true” in the end of your command. But there’s a bug in our side, it should give you the clear error message.

1reaction
lucassimoesmaistrocommented, Jul 23, 2020

@sandeepmindwave , thanks for the report. To make it work, you need enable either the commit-trigger or base-image trigger when using the git-access-token. It works if adding “–commit-trigger-enabled false --base-image-trigger-enabled true” in the end of your command. But there’s a bug in our side, it should give you the clear error message.

It works for me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

az acr task | Microsoft Learn
Manage a collection of steps for building, testing and OS & Framework patching container images using Azure Container Registries. In this article. Commands;...
Read more >
Azure pipeline CLI task with acr purge getting failed
az cli version 2.26.1 only supports the same. The current latest image cli version is 2.26.0.
Read more >
Automating Infrastructure Deployments in the Cloud with ...
How to automate infrastructure deployments in the Cloud with Ansible and Azure pipelines. The following image will walk you through all the ......
Read more >
How-to setup Continuous Deployment using ACR Tasks with ...
ACR Tasks are a set of Azure CLI command features in Azure Container Registry that can help you automate container image builds.
Read more >
A look at ACR Tasks | The Code Attic - WordPress.com
Hence, I return back to some old notes I started collecting back in May around using the Azure Container Registry Tasks (ACR Tasks)...
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