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

'NoneType' object is not callable #18817

Closed
pkazi opened this issue Jul 12, 2021 · 2 comments
Closed

'NoneType' object is not callable #18817

pkazi opened this issue Jul 12, 2021 · 2 comments
Assignees
Labels
Storage az storage

Comments

@pkazi
Copy link

pkazi commented Jul 12, 2021

az feedback auto-generates most of the information requested below, as of CLI version 2.0.62

Describe the bug
When run az storage blob copy start, from one account to other account, it fails with error - 'NoneType' object is not callable

To Reproduce
Run

az storage blob copy start --source-account-name {} --source-account-key {} --source-container {} --source-blob {} --account-name {} --account-key {} --destination-container {} --destination-blob {} --debug

It works fine on 2.23.0
Could be caused by #18170 ?

Expected behavior

  • Blob copy operation should be started.

Environment summary
Azure-cli on Centos 7 -

$ az --version
azure-cli                         2.26.0

core                              2.26.0
telemetry                          1.0.6

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

Python (Linux) 3.6.8 (default, Nov 16 2020, 16:55:22)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-44)]

Additional context
Stacktrace with debug mode -

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 0x7fd14e091d08>, <function OutputProducer.on_global_arguments at 0x7fd14dbd4e18>, <function CLIQuery.on_global_arguments at 0x7fd14d96f158>]
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.036        53       247
cli.azure.cli.core: Total (1)                 0.036        53       247
cli.azure.cli.core: Loaded 53 groups, 247 commands.
cli.azure.cli.core: Found a match in the command table.
cli.azure.cli.core: Raw command  : storage blob copy start
cli.azure.cli.core: Command table: storage blob copy start
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x7fd14cd12d08>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '/root/.azure/commands/2021-07-12.08-59-29.storage_blob_copy_start.11971.log'.
az_command_data_logger: command args: storage blob copy start --source-account-name {} --source-account-key {} --source-container {} --source-blob {} --account-name {} --account-key {} --destination-container {} --destination-blob {} --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument.<locals>.add_subscription_parameter at 0x7fd14ccb8c80>, <function register_global_query_examples_argument.<locals>.register_query_examples at 0x7fd14cc99d08>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument.<locals>.add_ids_arguments at 0x7fd14cc99d90>, <function register_cache_arguments.<locals>.add_cache_arguments at 0x7fd14cc99ea0>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x7fd14dbd4ea0>, <function CLIQuery.handle_query_parameter at 0x7fd14d96f1e0>, <function register_global_query_examples_argument.<locals>.handle_example_parameter at 0x7fd14cc99c80>, <function register_ids_argument.<locals>.parse_ids_arguments at 0x7fd14cc99e18>]
cli.azure.cli.command_modules.storage._validators: Try to get storage auth_mode value from environment variables or config file.
cli.azure.cli.command_modules.storage._validators: Try to get storage sas_token value from environment variables or config file.
cli.azure.cli.command_modules.storage._validators: Try to get storage sas_token value from environment variables or config file.
True
cli.azure.cli.core.azclierror: 'NoneType' object is not callable
az_command_data_logger: 'NoneType' object is not callable
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x7fd14cd12f28>]
az_command_data_logger: exit code: 2
cli.__main__: Command ran in 0.550 seconds (init: 0.137, invoke: 0.413)
cli.azure.cli.core.decorators: Suppress exception:
Traceback (most recent call last):
  File "/lib64/az/lib/python3.6/site-packages/knack/invocation.py", line 113, in _validation
    self._validate_arg_level(parsed_ns)
  File "/lib64/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 853, in _validate_arg_level
    validator(**self._build_kwargs(validator, ns))
  File "/lib64/az/lib/python3.6/site-packages/azure/cli/command_modules/storage/_validators.py", line 475, in validate_source_url
    source_sas = create_short_lived_blob_sas(cmd, source_account_name, source_account_key, container, blob)
  File "/lib64/az/lib/python3.6/site-packages/azure/cli/command_modules/storage/util.py", line 116, in create_short_lived_blob_sas
    sas = t_sas(account_name, account_key)
TypeError: 'NoneType' object is not callable

During handling of the above exception, another exception occurred:
@ghost ghost added needs-triage This is a new issue that needs to be triaged to the appropriate team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that customer-reported Issues that are reported by GitHub users external to the Azure organization. labels Jul 12, 2021
@yonzhan yonzhan added Storage az storage and removed customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-triage This is a new issue that needs to be triaged to the appropriate team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Jul 12, 2021
@yonzhan yonzhan added this to the Jul 2021 (2021-08-03) milestone Jul 12, 2021
@yonzhan
Copy link
Collaborator

yonzhan commented Jul 12, 2021

storage

@Juliehzl
Copy link
Contributor

Fix in #18730

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Storage az storage
Projects
None yet
Development

No branches or pull requests

3 participants