Skip to content
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

A bug related to storages prevent cli commands to succeed #29904

Closed
mbegoc opened this issue Sep 12, 2024 · 9 comments
Closed

A bug related to storages prevent cli commands to succeed #29904

mbegoc opened this issue Sep 12, 2024 · 9 comments
Assignees
Labels
Auto-Assign Auto assign by bot Azure CLI Team The command of the issue is owned by Azure CLI team customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Storage az storage
Milestone

Comments

@mbegoc
Copy link

mbegoc commented Sep 12, 2024

Describe the bug

Under certain circumstances, a variety of commands related to storage will fail with a NoneType error.

Related command

az storage *

Errors

The command failed with an unexpected error. Here is the traceback:
'NoneType' object is not iterable
Traceback (most recent call last):
File "/home/michel/ws/projects/mypath-sa/venvcli/lib/python3.12/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/michel/ws/projects/mypath-sa/venvcli/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 564, in execute
self.commands_loader.load_arguments(command)
File "/home/michel/ws/projects/mypath-sa/venvcli/lib/python3.12/site-packages/azure/cli/core/init.py", line 527, in load_arguments
loader.load_arguments(command) # this adds entries to the argument registries
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/michel/ws/projects/mypath-sa/venvcli/lib/python3.12/site-packages/azure/cli/command_modules/storage/init.py", line 42, in load_arguments
load_arguments(self, command)
File "/home/michel/ws/projects/mypath-sa/venvcli/lib/python3.12/site-packages/azure/cli/command_modules/storage/_params.py", line 758, in load_arguments
get_permission_help_string(t_account_permissions)),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/michel/ws/projects/mypath-sa/venvcli/lib/python3.12/site-packages/azure/cli/command_modules/storage/_validators.py", line 871, in get_permission_help_string
return ' '.join(['({}){}'.format(x[0], x[1:]) for x in allowed_values])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not iterable

Issue script & Debug output

cli.knack.cli: Command arguments: ['storage', 'account', 'show-connection-string', '-g', 'ansible', '-n', 'ansiblemypathstorage', '--key', 'key1', '--debug']
cli.knack.cli: init debug log:
Enable color in terminal.
cli.knack.cli: Event: Cli.PreExecute []
cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x7994309f7a60>, <function OutputProducer.on_global_arguments at 0x79943077f560>, <function CLIQuery.on_global_arguments at 0x7994307dccc0>]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Modules found from index for 'storage': ['azure.cli.command_modules.storage']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name Load Time Groups Commands
cli.azure.cli.core: storage 0.189 59 273
cli.azure.cli.core: Total (1) 0.189 59 273
cli.azure.cli.core: Loaded 59 groups, 273 commands.
cli.azure.cli.core: Found a match in the command table.
cli.azure.cli.core: Raw command : storage account show-connection-string
cli.azure.cli.core: Command table: storage account show
cli.azure.cli.core: remaining : connection-string
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x79942fa66d40>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '/home/michel/.azure/commands/2024-09-12.18-34-53.storage_account_show-connection-string.1473212.log'.
az_command_data_logger: command args: storage account show-connection-string -g {} -n {} --key {} --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument..add_subscription_parameter at 0x79942fab8f40>]
cli.azure.cli.core.profiles._shared: Traceback (most recent call last):
File "/home/michel/ws/projects/mypath-sa/venvcli/lib/python3.12/site-packages/azure/cli/core/profiles/_shared.py", line 656, in _get_attr
op = import_module(full_mod_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/importlib/init.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1310, in _find_and_load_unlocked
File "", line 488, in _call_with_frames_removed
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1310, in _find_and_load_unlocked
File "", line 488, in _call_with_frames_removed
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1331, in _find_and_load_unlocked
File "", line 935, in _load_unlocked
File "", line 995, in exec_module
File "", line 488, in _call_with_frames_removed
File "/home/michel/ws/projects/mypath-sa/venvcli/lib/python3.12/site-packages/azure/multiapi/storagev2/fileshare/init.py", line 1, in
import('pkg_resources').declare_namespace(name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'pkg_resources'

cli.azure.cli.core.profiles._shared: Traceback (most recent call last):
File "/home/michel/ws/projects/mypath-sa/venvcli/lib/python3.12/site-packages/azure/cli/core/profiles/_shared.py", line 656, in _get_attr
op = import_module(full_mod_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/importlib/init.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1310, in _find_and_load_unlocked
File "", line 488, in _call_with_frames_removed
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1310, in _find_and_load_unlocked
File "", line 488, in _call_with_frames_removed
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1331, in _find_and_load_unlocked
File "", line 935, in _load_unlocked
File "", line 995, in exec_module
File "", line 488, in _call_with_frames_removed
File "/home/michel/ws/projects/mypath-sa/venvcli/lib/python3.12/site-packages/azure/multiapi/storagev2/queue/init.py", line 1, in
import('pkg_resources').declare_namespace(name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'pkg_resources'

cli.azure.cli.core.profiles._shared: Traceback (most recent call last):
File "/home/michel/ws/projects/mypath-sa/venvcli/lib/python3.12/site-packages/azure/cli/core/profiles/_shared.py", line 656, in _get_attr
op = import_module(full_mod_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/importlib/init.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1310, in _find_and_load_unlocked
File "", line 488, in _call_with_frames_removed
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1331, in _find_and_load_unlocked
File "", line 935, in _load_unlocked
File "", line 995, in exec_module
File "", line 488, in _call_with_frames_removed
File "/home/michel/ws/projects/mypath-sa/venvcli/lib/python3.12/site-packages/azure/multiapi/cosmosdb/v2017_04_17/init.py", line 1, in
import('pkg_resources').declare_namespace(name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'pkg_resources'

cli.azure.cli.core.profiles._shared: Traceback (most recent call last):
File "/home/michel/ws/projects/mypath-sa/venvcli/lib/python3.12/site-packages/azure/cli/core/profiles/_shared.py", line 660, in _get_attr
op = getattr(op, part)
^^^^^^^^^^^^^^^^^
AttributeError: module 'azure.mgmt.storage.v2023_05_01.models' has no attribute 'ActiveDirectoryPropertiesAccountType'

cli.azure.cli.core.profiles._shared: Traceback (most recent call last):
File "/home/michel/ws/projects/mypath-sa/venvcli/lib/python3.12/site-packages/azure/cli/core/profiles/_shared.py", line 656, in _get_attr
op = import_module(full_mod_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/importlib/init.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1310, in _find_and_load_unlocked
File "", line 488, in _call_with_frames_removed
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1310, in _find_and_load_unlocked
File "", line 488, in _call_with_frames_removed
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1310, in _find_and_load_unlocked
File "", line 488, in _call_with_frames_removed
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1310, in _find_and_load_unlocked
File "", line 488, in _call_with_frames_removed
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1331, in _find_and_load_unlocked
File "", line 935, in _load_unlocked
File "", line 995, in exec_module
File "", line 488, in _call_with_frames_removed
File "/home/michel/ws/projects/mypath-sa/venvcli/lib/python3.12/site-packages/azure/multiapi/storagev2/blob/init.py", line 1, in
import('pkg_resources').declare_namespace(name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'pkg_resources'

cli.azure.cli.core.profiles._shared: Traceback (most recent call last):
File "/home/michel/ws/projects/mypath-sa/venvcli/lib/python3.12/site-packages/azure/cli/core/profiles/_shared.py", line 656, in _get_attr
op = import_module(full_mod_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/importlib/init.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1310, in _find_and_load_unlocked
File "", line 488, in _call_with_frames_removed
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1310, in _find_and_load_unlocked
File "", line 488, in _call_with_frames_removed
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1310, in _find_and_load_unlocked
File "", line 488, in _call_with_frames_removed
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1310, in _find_and_load_unlocked
File "", line 488, in _call_with_frames_removed
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1331, in _find_and_load_unlocked
File "", line 935, in _load_unlocked
File "", line 995, in exec_module
File "", line 488, in _call_with_frames_removed
File "/home/michel/ws/projects/mypath-sa/venvcli/lib/python3.12/site-packages/azure/multiapi/storagev2/blob/init.py", line 1, in
import('pkg_resources').declare_namespace(name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'pkg_resources'

cli.azure.cli.core.profiles._shared: Traceback (most recent call last):
File "/home/michel/ws/projects/mypath-sa/venvcli/lib/python3.12/site-packages/azure/cli/core/profiles/_shared.py", line 660, in _get_attr
op = getattr(op, part)
^^^^^^^^^^^^^^^^^
AttributeError: module 'azure.mgmt.storage.v2023_05_01.models' has no attribute 'ListKeyExpand'

cli.azure.cli.core.profiles._shared: Traceback (most recent call last):
File "/home/michel/ws/projects/mypath-sa/venvcli/lib/python3.12/site-packages/azure/cli/core/profiles/_shared.py", line 656, in _get_attr
op = import_module(full_mod_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/importlib/init.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1310, in _find_and_load_unlocked
File "", line 488, in _call_with_frames_removed
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1310, in _find_and_load_unlocked
File "", line 488, in _call_with_frames_removed
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1310, in _find_and_load_unlocked
File "", line 488, in _call_with_frames_removed
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1331, in _find_and_load_unlocked
File "", line 935, in _load_unlocked
File "", line 995, in exec_module
File "", line 488, in _call_with_frames_removed
File "/home/michel/ws/projects/mypath-sa/venvcli/lib/python3.12/site-packages/azure/multiapi/storagev2/blob/init.py", line 1, in
import('pkg_resources').declare_namespace(name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'pkg_resources'

cli.azure.cli.core.azclierror: Traceback (most recent call last):
File "/home/michel/ws/projects/mypath-sa/venvcli/lib/python3.12/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/michel/ws/projects/mypath-sa/venvcli/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 564, in execute
self.commands_loader.load_arguments(command)
File "/home/michel/ws/projects/mypath-sa/venvcli/lib/python3.12/site-packages/azure/cli/core/init.py", line 527, in load_arguments
loader.load_arguments(command) # this adds entries to the argument registries
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/michel/ws/projects/mypath-sa/venvcli/lib/python3.12/site-packages/azure/cli/command_modules/storage/init.py", line 42, in load_arguments
load_arguments(self, command)
File "/home/michel/ws/projects/mypath-sa/venvcli/lib/python3.12/site-packages/azure/cli/command_modules/storage/_params.py", line 758, in load_arguments
get_permission_help_string(t_account_permissions)),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/michel/ws/projects/mypath-sa/venvcli/lib/python3.12/site-packages/azure/cli/command_modules/storage/_validators.py", line 871, in get_permission_help_string
return ' '.join(['({}){}'.format(x[0], x[1:]) for x in allowed_values])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not iterable

cli.azure.cli.core.azclierror: The command failed with an unexpected error. Here is the traceback:
az_command_data_logger: The command failed with an unexpected error. Here is the traceback:
cli.azure.cli.core.azclierror: 'NoneType' object is not iterable
Traceback (most recent call last):
File "/home/michel/ws/projects/mypath-sa/venvcli/lib/python3.12/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/michel/ws/projects/mypath-sa/venvcli/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 564, in execute
self.commands_loader.load_arguments(command)
File "/home/michel/ws/projects/mypath-sa/venvcli/lib/python3.12/site-packages/azure/cli/core/init.py", line 527, in load_arguments
loader.load_arguments(command) # this adds entries to the argument registries
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/michel/ws/projects/mypath-sa/venvcli/lib/python3.12/site-packages/azure/cli/command_modules/storage/init.py", line 42, in load_arguments
load_arguments(self, command)
File "/home/michel/ws/projects/mypath-sa/venvcli/lib/python3.12/site-packages/azure/cli/command_modules/storage/_params.py", line 758, in load_arguments
get_permission_help_string(t_account_permissions)),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/michel/ws/projects/mypath-sa/venvcli/lib/python3.12/site-packages/azure/cli/command_modules/storage/_validators.py", line 871, in get_permission_help_string
return ' '.join(['({}){}'.format(x[0], x[1:]) for x in allowed_values])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not iterable
az_command_data_logger: 'NoneType' object is not iterable
Traceback (most recent call last):
File "/home/michel/ws/projects/mypath-sa/venvcli/lib/python3.12/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/michel/ws/projects/mypath-sa/venvcli/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 564, in execute
self.commands_loader.load_arguments(command)
File "/home/michel/ws/projects/mypath-sa/venvcli/lib/python3.12/site-packages/azure/cli/core/init.py", line 527, in load_arguments
loader.load_arguments(command) # this adds entries to the argument registries
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/michel/ws/projects/mypath-sa/venvcli/lib/python3.12/site-packages/azure/cli/command_modules/storage/init.py", line 42, in load_arguments
load_arguments(self, command)
File "/home/michel/ws/projects/mypath-sa/venvcli/lib/python3.12/site-packages/azure/cli/command_modules/storage/_params.py", line 758, in load_arguments
get_permission_help_string(t_account_permissions)),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/michel/ws/projects/mypath-sa/venvcli/lib/python3.12/site-packages/azure/cli/command_modules/storage/_validators.py", line 871, in get_permission_help_string
return ' '.join(['({}){}'.format(x[0], x[1:]) for x in allowed_values])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not iterable
To check existing issues, please visit: https://github.com/Azure/azure-cli/issues
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x79942fa66fc0>]
az_command_data_logger: exit code: 1
cli.main: Command ran in 0.505 seconds (init: 0.139, invoke: 0.366)
telemetry.main: Begin splitting cli events and extra events, total events: 1
telemetry.client: Accumulated 0 events. Flush the clients.
telemetry.main: Finish splitting cli events and extra events, cli events: 1
telemetry.save: Save telemetry record of length 7689 in cache
telemetry.main: Begin creating telemetry upload process.
telemetry.process: Creating upload process: "/home/michel/ws/projects/mypath-sa/venvcli/bin/python /home/michel/ws/projects/mypath-sa/venvcli/lib/python3.12/site-packages/azure/cli/telemetry/init.py /home/michel/.azure"
telemetry.process: Return from creating process
telemetry.main: Finish creating telemetry upload process.

Expected behavior

Success.

Environment Summary

azure-cli 2.64.0

core 2.64.0
telemetry 1.1.0

Dependencies:
msal 1.30.0
azure-mgmt-resource 23.1.1

Additional context

I had the issue with many storage related commands.

The get_permission_help_string call the get_permission_allowed_values function passing the permission_class parameter to it. It iterates the result into a list comprehension right after.

When the permission_class is None, the get_permission_allowed_values return None, thus it crashes. Returning [] make the list comprehension work. I don't know if it could have side effects though.

It seems the permission_class was empty for me because of something related to DATA_STORAGE_BLOB = ('azure.multiapi.storagev2.blob', None). Replacing return None by return [] worked for me (wanted to get the connection string to the storage. The string worked in my app)

@mbegoc mbegoc added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Sep 12, 2024
@yonzhan
Copy link
Collaborator

yonzhan commented Sep 12, 2024

Thank you for opening this issue, we will look into it.

@microsoft-github-policy-service microsoft-github-policy-service bot added customer-reported Issues that are reported by GitHub users external to the Azure organization. Storage az storage labels Sep 12, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added Auto-Assign Auto assign by bot Azure CLI Team The command of the issue is owned by Azure CLI team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Sep 12, 2024
@yonzhan yonzhan added this to the Backlog milestone Sep 12, 2024
@yonzhan yonzhan removed the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Sep 12, 2024
@pgrandjean
Copy link

pgrandjean commented Sep 14, 2024

Same error. When is this planned to be fixed? Which version of azure-cli should be used instead?

@JohanLindvall
Copy link

Are you installing with pip? We had a similar issue when installing with pip. Switching to apt solved it for us.

@mbegoc
Copy link
Author

mbegoc commented Sep 16, 2024

@JohanLindvall yes, I installed it with pip. I don't want to install it system wide, so it's the way to go for me. Which version apt installed? Pip install the latest one, maybe apt install an older one?

@JohanLindvall
Copy link

JohanLindvall commented Sep 17, 2024

@mbegoc

IIRC, pip install isn't 100% supported. For me, a pip install of the latest version fails immediately, but apt succeeds. Apt installs with a custom, isolated python installation with dependencies.

Having said that, the pip install started failing after our CI images got upgraded from python 3.12.5 to 3.12.6

@pgrandjean
Copy link

@JohanLindvall I went back to 2.62.0 and had to install setuptools for it to work, using pip.

@Anonymous-Coward
Copy link

@mbegoc

IIRC, pip install isn't 100% supported. For me, a pip install of the latest version fails immediately, but apt succeeds. Apt installs with a custom, isolated python installation with dependencies.

Having said that, the pip install started failing after our CI images got upgraded from python 3.12.5 to 3.12.6

Can't use apt on alpine. Can't even use apk, since there's no alpine package available. With newer alpine versions, you can't even use pip - you get an error upon installation:

error: externally-managed-environment

× This environment is externally managed
╰─> 
    The system-wide python installation should be maintained using the system
    package manager (apk) only.

If you use pipx to install az, installation works, but you get the bug described above at runtime.

@bebound
Copy link
Contributor

bebound commented Sep 18, 2024

Please install setuptools in your venv and try again.

Related PR: #27196

@mbegoc
Copy link
Author

mbegoc commented Sep 18, 2024

@bebound it did the trick! Thanks.

@mbegoc mbegoc closed this as not planned Won't fix, can't repro, duplicate, stale Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Assign Auto assign by bot Azure CLI Team The command of the issue is owned by Azure CLI team customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Storage az storage
Projects
None yet
Development

No branches or pull requests

8 participants