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

Azure CLI (ubuntu) cannot deploy zip file

Open yakeem opened this issue 8 years ago • 1 comments

I would like to deploy zip file with newest azure cli version, however every time i get an error as below. Parallel I have also installed Azure CLI on windows (some older version, probably from november), and there the same command with the same zip works fine.

'str' object has no attribute 'cloud' Traceback (most recent call last): File "/opt/az/lib/python3.6/site-packages/knack/cli.py", line 194, in invoke cmd_result = self.invocation.execute(args) File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 319, 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 292, in execute result = cmd(params) File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 169, 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 337, in default_command_handler result = op(**command_args) File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/appservice/custom.py", line 1605, in enable_zip_deploy user_name, password = _get_site_credential(resource_group_name, name, slot) File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/appservice/custom.py", line 1240, in _get_site_credential creds = _generic_site_operation(resource_group_name, name, 'list_publishing_credentials', slot) File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/appservice/_appservice_utils.py", line 11, in _generic_site_operation client = client or web_client_factory(cli_ctx) File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/appservice/_client_factory.py", line 35, in web_client_factory return get_mgmt_service_client(cli_ctx, WebSiteManagementClient) File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/client_factory.py", line 35, in get_mgmt_service_client api_version=api_version, sdk_profile=sdk_profile, **kwargs) File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/client_factory.py", line 83, in _get_mgmt_service_client resource = resource or cli_ctx.cloud.endpoints.active_directory_resource_id AttributeError: 'str' object has no attribute 'cloud'

yakeem avatar Jan 31 '18 16:01 yakeem

Please upgrade to the latest CLI which has the fix for this

yugangw-msft avatar Jan 31 '18 17:01 yugangw-msft