Azure / azure-cli

Azure Command-Line Interface
MIT License
3.97k stars 2.95k forks source link

unable to run az storage list #23263

Open cbittne opened 2 years ago

cbittne commented 2 years ago

This is autogenerated. Please review and update as needed.

Describe the bug

Command Name az storage account list

Errors:

The command failed with an unexpected error. Here is the traceback:
function() argument 'code' must be code, not str
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/knack/cli.py", line 231, in invoke
    cmd_result = self.invocation.execute(args)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 561, in execute
    self.commands_loader.load_arguments(command)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/azure/cli/core/__init__.py", line 516, in load_arguments
    loader.load_arguments(command)  # this adds entries to the argument registries
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/azure/cli/command_modules/storage/__init__.py", line 31, in load_arguments
    load_arguments(self, command)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/azure/cli/command_modules/storage/_params.py", line 41, in load_arguments
    t_share_service = self.get_sdk('_share_service_client#ShareServiceClient',
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/azure/cli/core/__init__.py", line 756, in get_sdk
    return get_sdk(self.cli_ctx, kwargs.pop('resource_type', self._get_resource_type()),
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/azure/cli/core/profiles/__init__.py", line 91, in get_sdk
    return _sdk_get_versioned_sdk(cli_ctx.cloud.profile, resource_type, *attr_args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/azure/cli/core/profiles/_shared.py", line 661, in get_versioned_sdk
    loaded_obj = _get_attr(sdk_path, mod_attr_path, checked)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/azure/cli/core/profiles/_shared.py", line 614, in _get_attr
    op = import_module(full_mod_path)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 992, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/azure/multiapi/storagev2/fileshare/v2021_06_08/__init__.py", line 8, in <module>
    from ._file_client import ShareFileClient
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/azure/multiapi/storagev2/fileshare/v2021_06_08/_file_client.py", line 30, in <module>
    from ._shared.base_client import StorageAccountHostsMixin, parse_connection_str, parse_query
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/azure/multiapi/storagev2/fileshare/v2021_06_08/_shared/base_client.py", line 40, in <module>
    from .authentication import SharedKeyCredentialPolicy
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/azure/multiapi/storagev2/fileshare/v2021_06_08/_shared/authentication.py", line 22, in <module>
    from azure.core.pipeline.transport import AioHttpTransport
  File "<frozen importlib._bootstrap>", line 1075, in _handle_fromlist
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/azure/core/pipeline/transport/__init__.py", line 68, in __getattr__
    from ._aiohttp import AioHttpTransport
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/azure/core/pipeline/transport/_aiohttp.py", line 35, in <module>
    import aiohttp
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/aiohttp/__init__.py", line 6, in <module>
    from .client import (
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/aiohttp/client.py", line 35, in <module>
    from . import hdrs, http, payload
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/aiohttp/http.py", line 7, in <module>
    from .http_parser import (
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/aiohttp/http_parser.py", line 15, in <module>
    from .helpers import NO_EXTENSIONS, BaseTimerContext
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/aiohttp/helpers.py", line 667, in <module>
    class CeilTimeout(async_timeout.timeout):
TypeError: function() argument 'code' must be code, not str

To Reproduce:

Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

Expected Behavior

Environment Summary

macOS-12.4-x86_64-i386-64bit
Python 3.10.4
Installer: PIP

azure-cli 2.38.0

Additional Context

yonzhan commented 2 years ago

storage

bebound commented 2 years ago

I can't reproduce, but this might be related to https://github.com/aio-libs/aiohttp/issues/6794.

Could you please do a clean install and try again?

ghost commented 2 years ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @xgithubtriage.

Issue Details
### **This is autogenerated. Please review and update as needed.** ## Describe the bug **Command Name** `az storage account list` **Errors:** ``` The command failed with an unexpected error. Here is the traceback: function() argument 'code' must be code, not str Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/knack/cli.py", line 231, in invoke cmd_result = self.invocation.execute(args) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 561, in execute self.commands_loader.load_arguments(command) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/azure/cli/core/__init__.py", line 516, in load_arguments loader.load_arguments(command) # this adds entries to the argument registries File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/azure/cli/command_modules/storage/__init__.py", line 31, in load_arguments load_arguments(self, command) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/azure/cli/command_modules/storage/_params.py", line 41, in load_arguments t_share_service = self.get_sdk('_share_service_client#ShareServiceClient', File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/azure/cli/core/__init__.py", line 756, in get_sdk return get_sdk(self.cli_ctx, kwargs.pop('resource_type', self._get_resource_type()), File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/azure/cli/core/profiles/__init__.py", line 91, in get_sdk return _sdk_get_versioned_sdk(cli_ctx.cloud.profile, resource_type, *attr_args, **kwargs) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/azure/cli/core/profiles/_shared.py", line 661, in get_versioned_sdk loaded_obj = _get_attr(sdk_path, mod_attr_path, checked) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/azure/cli/core/profiles/_shared.py", line 614, in _get_attr op = import_module(full_mod_path) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 992, in _find_and_load_unlocked File "", line 241, in _call_with_frames_removed File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 1006, in _find_and_load_unlocked File "", line 688, in _load_unlocked File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/azure/multiapi/storagev2/fileshare/v2021_06_08/__init__.py", line 8, in from ._file_client import ShareFileClient File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/azure/multiapi/storagev2/fileshare/v2021_06_08/_file_client.py", line 30, in from ._shared.base_client import StorageAccountHostsMixin, parse_connection_str, parse_query File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/azure/multiapi/storagev2/fileshare/v2021_06_08/_shared/base_client.py", line 40, in from .authentication import SharedKeyCredentialPolicy File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/azure/multiapi/storagev2/fileshare/v2021_06_08/_shared/authentication.py", line 22, in from azure.core.pipeline.transport import AioHttpTransport File "", line 1075, in _handle_fromlist File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/azure/core/pipeline/transport/__init__.py", line 68, in __getattr__ from ._aiohttp import AioHttpTransport File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/azure/core/pipeline/transport/_aiohttp.py", line 35, in import aiohttp File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/aiohttp/__init__.py", line 6, in from .client import ( File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/aiohttp/client.py", line 35, in from . import hdrs, http, payload File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/aiohttp/http.py", line 7, in from .http_parser import ( File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/aiohttp/http_parser.py", line 15, in from .helpers import NO_EXTENSIONS, BaseTimerContext File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/aiohttp/helpers.py", line 667, in class CeilTimeout(async_timeout.timeout): TypeError: function() argument 'code' must be code, not str ``` ## To Reproduce: Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information. - _Put any pre-requisite steps here..._ - `az storage account list` ## Expected Behavior ## Environment Summary ``` macOS-12.4-x86_64-i386-64bit Python 3.10.4 Installer: PIP azure-cli 2.38.0 ``` ## Additional Context
Author: cbittne
Assignees: evelyn-ys
Labels: `bug`, `Storage`, `Service Attention`, `customer-reported`, `Auto-Assign`, `Azure CLI Team`
Milestone: Backlog