-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Azure CLI: API version 2022-05-01 does not have operation group 'storage_accounts' #23821
Comments
@evelyn-ys for awareness |
I'm facing the same issue. Is there any fix? |
By specifying Can you share the debug log if still have problems after adding |
Thank you for your feedback. This has been routed to the support team for assistance. |
The point is that I'm using az-cli to get the key. Here is what I see: $ az storage account keys list --account-name "${STORAGE_NAME}" --subscription "${SUBSCRIPTION_NAME}"
Auto upgrade failed. name 'exit_code' is not defined
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/knack/cli.py", line 231, in invoke
cmd_result = self.invocation.execute(args)
File "/usr/local/lib/python3.8/site-packages/azure/cli/core/commands/__init__.py", line 561, in execute
self.commands_loader.load_arguments(command)
File "/usr/local/lib/python3.8/site-packages/azure/cli/core/__init__.py", line 507, in load_arguments
self.command_table[command].load_arguments() # this loads the arguments via reflection
File "/usr/local/lib/python3.8/site-packages/azure/cli/core/commands/__init__.py", line 318, in load_arguments
super(AzCliCommand, self).load_arguments()
File "/usr/local/lib/python3.8/site-packages/knack/commands.py", line 104, in load_arguments
cmd_args = self.arguments_loader()
File "/usr/local/lib/python3.8/site-packages/azure/cli/core/commands/command_operation.py", line 125, in arguments_loader
op = self.get_op_handler(self.op_path)
File "/usr/local/lib/python3.8/site-packages/azure/cli/core/commands/command_operation.py", line 59, in get_op_handler
handler = import_module(mod_to_import)
File "/usr/local/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 961, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'azure.mgmt.storage.v2022_05_01'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/local/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/usr/local/lib/python3.8/site-packages/azure/cli/__main__.py", line 49, in <module>
exit_code = cli_main(az_cli, sys.argv[1:])
File "/usr/local/lib/python3.8/site-packages/azure/cli/__main__.py", line 36, in cli_main
return cli.invoke(args)
File "/usr/local/lib/python3.8/site-packages/knack/cli.py", line 243, in invoke
exit_code = self.exception_handler(ex)
File "/usr/local/lib/python3.8/site-packages/azure/cli/core/__init__.py", line 127, in exception_handler
return handle_exception(ex)
File "/usr/local/lib/python3.8/site-packages/azure/cli/core/util.py", line 64, in handle_exception
from msal_extensions.persistence import PersistenceError
ImportError: cannot import name 'PersistenceError' from 'msal_extensions.persistence' (/usr/local/lib/python3.8/site-packages/msal_extensions/persistence.py)
$ az --version
azure-cli 2.40.0
core 2.40.0
telemetry 1.0.8
Extensions:
azure-cli-ml 1.41.0
Dependencies:
msal 1.18.0b1
azure-mgmt-resource 21.1.0b1
Python location '/usr/local/bin/python'
Extensions directory '/home/XXXX/.azure/cliextensions'
Python (Linux) 3.8.13 (default, May 28 2022, 14:23:53)
[GCC 10.2.1 20210110]
Legal docs and information: aka.ms/AzureCliLegal
Your CLI is up-to-date |
Seems like some dependencies are missing( |
Hi @evelyn-ys This is how I installed az-cli: curl -sL https://aka.ms/InstallAzureCLIDeb | bash this is how I attempt to updated it: $ az upgrade
This command is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
You already have the latest azure-cli version: 2.40.0
Upgrading extensions
Checking update for storage-preview
Latest version of 'storage-preview' is already installed.
Use --debug for more information
Upgrade finished.You can enable auto-upgrade with 'az config set auto-upgrade.enable=yes'. More details in https://docs.microsoft.com/cli/azure/update-azure-cli#automatic-update
$ az storage account keys list --account-name "${STORAGE_NAME}" --subscription "${SUBSCRIPTION_NAME}"
Auto upgrade failed. name 'exit_code' is not defined
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/knack/cli.py", line 231, in invoke
cmd_result = self.invocation.execute(args)
File "/usr/local/lib/python3.8/site-packages/azure/cli/core/commands/__init__.py", line 561, in execute
self.commands_loader.load_arguments(command)
File "/usr/local/lib/python3.8/site-packages/azure/cli/core/__init__.py", line 507, in load_arguments
self.command_table[command].load_arguments() # this loads the arguments via reflection
File "/usr/local/lib/python3.8/site-packages/azure/cli/core/commands/__init__.py", line 318, in load_arguments
super(AzCliCommand, self).load_arguments()
File "/usr/local/lib/python3.8/site-packages/knack/commands.py", line 104, in load_arguments
cmd_args = self.arguments_loader()
File "/usr/local/lib/python3.8/site-packages/azure/cli/core/commands/command_operation.py", line 125, in arguments_loader
op = self.get_op_handler(self.op_path)
File "/usr/local/lib/python3.8/site-packages/azure/cli/core/commands/command_operation.py", line 59, in get_op_handler
handler = import_module(mod_to_import)
File "/usr/local/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 961, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'azure.mgmt.storage.v2022_05_01'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/local/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/usr/local/lib/python3.8/site-packages/azure/cli/__main__.py", line 49, in <module>
exit_code = cli_main(az_cli, sys.argv[1:])
File "/usr/local/lib/python3.8/site-packages/azure/cli/__main__.py", line 36, in cli_main
return cli.invoke(args)
File "/usr/local/lib/python3.8/site-packages/knack/cli.py", line 243, in invoke
exit_code = self.exception_handler(ex)
File "/usr/local/lib/python3.8/site-packages/azure/cli/core/__init__.py", line 127, in exception_handler
return handle_exception(ex)
File "/usr/local/lib/python3.8/site-packages/azure/cli/core/util.py", line 64, in handle_exception
from msal_extensions.persistence import PersistenceError
ImportError: cannot import name 'PersistenceError' from 'msal_extensions.persistence' (/usr/local/lib/python3.8/site-packages/msal_extensions/persistence.py) Can you send the specific updates I need to use to update? I use a linux-debian environment |
I think I found the issue. There is a conflict with other packages I install: python -m pip install --no-cache-dir --upgrade pip \
&& python -m pip install --no-cache-dir --upgrade "azure-ml-component[notebooks]" \
&& python -m pip install --no-cache-dir --upgrade azureml-dataset-runtime[fuse] \
&& az extension add --source https://azuremlsdktestpypi.blob.core.windows.net/wheels/componentsdk/azure_cli_ml-0.9.13-py3-none-any.whl --pip-extra-index-urls https://azuremlsdktestpypi.azureedge.net/componentsdk/0.9.13 --yes --verbose After installing these, I start seeing the error above |
Sounds like known issue of |
We recommend installing the Azure CLI DEB package, but if you have to use Please be aware that installing from |
This same error is happening for This broke a lot of our pipelines this week.
|
Azure DevOps Task:
|
Hello!
Describe the bug
Command Name
az storage blob upload
Errors:
To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.
az login --service-principal --username {} --tenant {} --password {}
az storage blob upload -f {} -c {} -n {} --account-name {} --subscription {} --auth-mode key
Expected Behavior
That the storage blob uploads successfully.
Environment Summary
Additional Context
We had to upgrade from
azure-cli
version 2.36 toazure-cli
version 2.40 due to a regression bug. We are now experiencing the aforementioned error and this is directly impacting our users. The CLI is authenticated using a service principal and has previously worked.The text was updated successfully, but these errors were encountered: