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

Unable to upload file using "az batch file upload" on windows #135

Open
huiyee1 opened this issue Mar 29, 2022 · 0 comments
Open

Unable to upload file using "az batch file upload" on windows #135

huiyee1 opened this issue Mar 29, 2022 · 0 comments

Comments

@huiyee1
Copy link

huiyee1 commented Mar 29, 2022

I was unable to upload file using az batch file upload. Below are the error message. What has I done wrong?

Describe the bug

Command Name
az batch file upload Extension Name: azure-batch-cli-extensions. Version: 6.0.0.

Errors:

The command failed with an unexpected error. Here is the traceback:
'NoneType' object has no attribute 'format'
Traceback (most recent call last):
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 231, in invoke
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 658, in execute
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 721, in _run_jobs_serially
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 713, in _run_job
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/batch/_exception_handler.py", line 28, in batch_exception_handler
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 692, in _run_job
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 328, in __call__
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 121, in handler
  File "C:\Users\Yong Hui Yee\.azure\cliextensions\azure-batch-cli-extensions\azext_batch\custom.py", line 205, in upload_file
    client.file.upload(local_path, file_group, remote_path=remote_path, flatten=flatten)
  File "C:\Users\Yong Hui Yee\.azure\cliextensions\azure-batch-cli-extensions\azext\batch\operations\file_operations.py", line 70, in upload
    file_utils.upload_blob(f, file_group, file_name, self.get_storage_client(),
  File "C:\Users\Yong Hui Yee\.azure\cliextensions\azure-batch-cli-extensions\azext\batch\batch_extensions_client.py", line 187, in _storage_account
    keys = storage_client.storage_accounts.list_keys(storage_resource_group, storage_account)
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/tracing/decorator.py", line 83, in wrapper_use_tracer
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/mgmt/storage/v2021_08_01/operations/_storage_accounts_operations.py", line 1197, in list_keys
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/pipeline/transport/_base.py", line 582, in format_url
AttributeError: 'NoneType' object has no attribute 'format'

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 batch file upload --local-path {} --file-group {} --account-name {} --account-endpoint {}

Expected Behavior

Environment Summary

Windows-10-10.0.18362-SP0
Python 3.8.9
Installer: MSI

azure-cli 2.34.1

Extensions:
azure-batch-cli-extensions 6.0.0

Dependencies:
msal 1.16.0
azure-mgmt-resource 20.0.0

Additional Context

@huiyee1 huiyee1 changed the title Unable to upload file using az batch file upload Unable to upload file using "az batch file upload" on windows Mar 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant