Receiving this error when using the extension.
Getting os disk id of the source vm/image
argument of type 'NoneType' is not iterable
Traceback (most recent call last):
File "/opt/az/lib/python3.6/site-packages/knack/cli.py", line 197, in invoke
cmd_result = self.invocation.execute(args)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 332, in execute
six.reraise(*sys.exc_info())
File "/opt/az/lib/python3.6/site-packages/six.py", line 693, in reraise
raise value
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 306, in execute
result = cmd(params)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 167, in call
return super(AzCliCommand, self).call(*args, **kwargs)
File "/opt/az/lib/python3.6/site-packages/knack/commands.py", line 109, in call
return self.handler(*args, **kwargs)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/init.py", line 420, in default_command_handler
result = op(**command_args)
File "/home/saadmin/.azure/cliextensions/image-copy-extension/azext_imagecopy/custom.py", line 29, in imagecopy
if 'id' not in json_cmd_output['storageProfile']['osDisk']['managedDisk']:
TypeError: argument of type 'NoneType' is not iterable
If i invoke this code manually i am able to view the json of the image.
az --version
azure-cli (2.0.32)
acr (2.0.24)
acs (2.0.32)
advisor (0.5.1)
ams (0.1.0)
appservice (0.1.32)
backup (1.1.1)
batch (3.2.2)
batchai (0.2.2)
billing (0.1.8)
cdn (0.0.14)
cloud (2.0.13)
cognitiveservices (0.1.13)
command-modules-nspkg (2.0.1)
configure (2.0.15)
consumption (0.3.1)
container (0.1.23)
core (2.0.32)
cosmosdb (0.1.21)
dla (0.0.19)
dls (0.0.21)
dms (0.0.1)
eventgrid (0.1.12)
eventhubs (0.1.3)
extension (0.0.13)
feedback (2.1.1)
find (0.2.9)
interactive (0.3.20)
iot (0.1.20)
keyvault (2.0.21)
lab (0.0.22)
monitor (0.1.6)
network (2.1.0)
nspkg (3.0.2)
profile (2.0.24)
rdbms (0.2.2)
redis (0.2.13)
reservations (0.1.2)
resource (2.0.28)
role (2.0.23)
servicebus (0.1.2)
servicefabric (0.0.12)
sql (2.0.25)
storage (2.0.32)
vm (2.0.31)
Extensions:
image-copy-extension (0.0.6)
Python location '/opt/az/bin/python3'
Extensions directory '/home/saadmin/.azure/cliextensions'
Python (Linux) 3.6.1 (default, Apr 30 2018, 23:14:03)
[GCC 5.4.0 20160609]
Legal docs and information: aka.ms/AzureCliLegal
Receiving this error when using the extension.
If i invoke this code manually i am able to view the json of the image.
az --version