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 storage account show-connection-string failing after upgrade to azure-cli 2.42.0

See original GitHub issue

Related command

az storage account show-connection-string

Describe the bug

az storage account show-connection-string seems to fail after an upgrade to azure-cli 2.42.0 (but works if downgraded to 2.41.0).

Output is:

The command failed with an unexpected error. Here is the traceback:
No value for given attribute
Traceback (most recent call last):
  File "/opt/az/lib/python3.10/site-packages/knack/cli.py", line 233, in invoke
    cmd_result = self.invocation.execute(args)
  File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 663, in execute
    raise ex
  File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 726, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
  File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 697, in _run_job
    result = cmd_copy(params)
  File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 333, in __call__
    return self.handler(*args, **kwargs)
  File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
    return op(**command_args)
  File "/opt/az/lib/python3.10/site-packages/azure/cli/command_modules/storage/operations/account.py", line 293, in show_storage_account_connection_string
    obj = scf.list_keys(resource_group_name, account_name, logging_enable=False)  # pylint: disable=no-member
  File "/opt/az/lib/python3.10/site-packages/azure/core/tracing/decorator.py", line 73, in wrapper_use_tracer
    return func(*args, **kwargs)
  File "/opt/az/lib/python3.10/site-packages/azure/mgmt/storage/v2022_05_01/operations/_storage_accounts_operations.py", line 1312, in list_keys
    request = build_list_keys_request(
  File "/opt/az/lib/python3.10/site-packages/azure/mgmt/storage/v2022_05_01/operations/_storage_accounts_operations.py", line 319, in build_list_keys_request
    "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
  File "/opt/az/lib/python3.10/site-packages/msrest/serialization.py", line 652, in url
    output = self.serialize_data(data, data_type, **kwargs)
  File "/opt/az/lib/python3.10/site-packages/msrest/serialization.py", line 760, in serialize_data
    raise ValueError("No value for given attribute")
ValueError: No value for given attribute

To Reproduce

Seems to happen when running any variation of az storage account show-connection-string --name $ACCOUNT.

Expected behavior

No failure/returns the connection string.

Environment summary

Happens on both Windows (installed via Chocolatey and upgraded through the CLI) and Debian (installed via apt-get).

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:5
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
evelyn-yscommented, Nov 2, 2022

Please add -g $resource_group_name as a workaround. Will figure out the route cause and update later

2reactions
evelyn-yscommented, Nov 17, 2022

The fix PR https://github.com/Azure/azure-cli/pull/24531 has been merged. The next release would be 12/6. Sorry for the inconvenience.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Release notes & updates – Azure CLI - Microsoft Learn
Learn about the latest Azure Command-Line Interface (CLI) release notes and updates for both the current and beta versions of the CLI.
Read more >
azure-cli-storage 2.4.3 - PyPI
storage blob show - Fix failing command when using oauth ( –auth-mode=login ). 2.3.1. Changed fix to update only properties that are changed...
Read more >
Azure.Storage.Blobs 12.14.1 - NuGet
To create a new Storage Account, you can use the Azure Portal, Azure PowerShell, or the Azure CLI. Here's an example using the...
Read more >
How to get the blob list of storage accounts with Azure CLI?
Update : fetch the account key in cli: Please try the code below, which can list all the blobs in all the containers...
Read more >
How to deploy to Azure Blob Storage | Uniform for Sitecore Docs
Enter the following command to enable static website hosting on the storage account. az storage blob service-properties update --account-name ...
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