Skip to content

az storage blob list fails with "NoneType object is not callable" on Amazon Linux #18159

Description

@cartley

Describe the bug

az storage blob list fails on Amazon Linux 2.

Command Name
az storage blob list

Errors:

The command failed with an unexpected error. Here is the traceback:
'NoneType' object is not callable
Traceback (most recent call last):
  File "/usr/lib64/az/lib/python3.6/site-packages/knack/cli.py", line 231, in invoke
    cmd_result = self.invocation.execute(args)
  File "/usr/lib64/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 657, in execute
    raise ex
  File "/usr/lib64/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 720, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
  File "/usr/lib64/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 712, in _run_job
    return cmd_copy.exception_handler(ex)
  File "/usr/lib64/az/lib/python3.6/site-packages/azure/cli/command_modules/storage/__init__.py", line 352, in new_handler
    raise ex
  File "/usr/lib64/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 691, in _run_job
    result = cmd_copy(params)
  File "/usr/lib64/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 328, in __call__
    return self.handler(*args, **kwargs)
  File "/usr/lib64/az/lib/python3.6/site-packages/azure/cli/core/commands/command_operation.py", line 112, in handler
    client = self.client_factory(self.cli_ctx, command_args) if self.client_factory else None
  File "/usr/lib64/az/lib/python3.6/site-packages/azure/cli/command_modules/storage/_client_factory.py", line 246, in cf_container_client
    return cf_blob_service(cli_ctx, kwargs).get_container_client(container=kwargs.pop('container_name', None))
  File "/usr/lib64/az/lib/python3.6/site-packages/azure/cli/command_modules/storage/_client_factory.py", line 229, in cf_blob_service
    return t_blob_service(account_url=account_url, credential=credential, **client_kwargs)
TypeError: 'NoneType' object is not callable

To Reproduce:

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

  • az storage blob list --account-name {} --account-key {} --container-name {}

Expected Behavior

List of blobs is returned without error

Environment Summary

Linux-4.14.231-173.361.amzn2.x86_64-x86_64-with-glibc2.2.5
Python 3.7.9
Installer: RPM

azure-cli 2.23.0

$ lsb_release -a
LSB Version:	:core-4.1-amd64:core-4.1-noarch
Distributor ID:	Amazon
Description:	Amazon Linux release 2 (Karoo)
Release:	2
Codename:	Karoo

$ az --version
azure-cli                         2.23.0

core                              2.23.0
telemetry                          1.0.6

Python location '/usr/bin/python3'
Extensions directory '/home/hbl2731/.azure/cliextensions'

Python (Linux) 3.7.9 (default, Feb 18 2021, 03:10:35) 
[GCC 7.3.1 20180712 (Red Hat 7.3.1-12)]

Additional Context

I installed with RPM after following the instructions to use yum/dnf did not work. Yum failed wieth "Processing Dependency: libpython3.6m.so.1.0" even though system has Python 3.7.

yumdownloader azure-cli
rpm -ivh --nodeps azure-cli-2.23.0-1.el7.x86_64.rpm 

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions