azure-cli icon indicating copy to clipboard operation
azure-cli copied to clipboard

'NoneType' object is not subscriptable

Open asiebenwirth-ish opened this issue 5 years ago • 5 comments

This is autogenerated. Please review and update as needed.

Describe the bug

Trying to create a new image version from a VM

Command Name az sig image-version create

Errors:

'NoneType' object is not subscriptable
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 659, in execute
    raise ex
cli/core/commands/__init__.py, ln 722, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
...
azure/cli/core/__init__.py, ln 784, in default_command_handler
    return op(**command_args)
cli/command_modules/vm/custom.py, ln 3276, in create_image_version
    external_bearer_token = external_tokens[0][0] + ' ' + external_tokens[0][1]
TypeError: 'NoneType' object is not subscriptable

To Reproduce:

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

  • Put any pre-requisite steps here...
  • az sig image-version create --resource-group {} --gallery-name {} --gallery-image-definition {} --gallery-image-version {} --target-regions {} --storage-account-type {} --replica-count {} --managed-image {}

Expected Behavior

Environment Summary

Linux-5.9.16-050916-generic-x86_64-with-debian-bullseye-sid
Python 3.6.10
Installer: DEB

azure-cli 2.17.1

Additional Context

asiebenwirth-ish avatar Jan 08 '21 13:01 asiebenwirth-ish

hi @qwordy could you pls have a look? thanks

yungezz avatar Jan 11 '21 01:01 yungezz

hi @asiebenwirth-ish, Thank you for reporting this issue. It was fixed by https://github.com/Azure/azure-cli/commit/72c2203957760402e115e2056d018aa7a520d7bc. Release date: 01/19/2021

qwordy avatar Jan 11 '21 03:01 qwordy

@qwordy Will this fix also address https://github.com/Azure/azure-cli/issues/16493?

plzm avatar Jan 11 '21 23:01 plzm

@qwordy Will this fix also address #16493?

Yes. Same issue.

qwordy avatar Jan 12 '21 02:01 qwordy

Fixed

asiebenwirth-ish avatar Jan 20 '21 15:01 asiebenwirth-ish