Azure / azure-cli

Azure Command-Line Interface
MIT License
4.01k stars 2.98k forks source link

Unable to download Blob on Mac OS UTF-8 #17868

Open sebastiaanvandesteeg opened 3 years ago

sebastiaanvandesteeg commented 3 years ago

This is autogenerated. Please review and update as needed.

Describe the bug

Command Name az storage blob download

Errors:

'utf-8' codec can't encode characters in position 2-3: surrogates not allowed
Traceback (most recent call last):
python3.8/site-packages/knack/cli.py, ln 233, in invoke
    cmd_result = self.invocation.execute(args)
cli/core/commands/__init__.py, ln 660, in execute
    raise ex
cli/core/commands/__init__.py, ln 723, in _run_jobs_serially
...
    return self._perform_request(request, _parse_blob,
storage/v2018_11_09/common/storageclient.py, ln 284, in _perform_request
    _update_request(request, self._X_MS_VERSION, self._USER_AGENT_STRING)
storage/v2018_11_09/common/_serialization.py, ln 74, in _update_request
    request.path = url_quote(request.path, '/()$=\',~')
lib/python3.8/urllib/parse.py, ln 844, in quote
    string = string.encode(encoding, errors)
UnicodeEncodeError: 'utf-8' codec can't encode characters in position 2-3: surrogates not allowed

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-11.2.1-x86_64-i386-64bit
Python 3.8.9
Installer: HOMEBREW

azure-cli 2.21.0 *

Extensions:
webapp 0.3.1

Additional Context

yonzhan commented 3 years ago

storage

ghost commented 3 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 blob download` **Errors:** ``` 'utf-8' codec can't encode characters in position 2-3: surrogates not allowed Traceback (most recent call last): python3.8/site-packages/knack/cli.py, ln 233, in invoke cmd_result = self.invocation.execute(args) cli/core/commands/__init__.py, ln 660, in execute raise ex cli/core/commands/__init__.py, ln 723, in _run_jobs_serially ... return self._perform_request(request, _parse_blob, storage/v2018_11_09/common/storageclient.py, ln 284, in _perform_request _update_request(request, self._X_MS_VERSION, self._USER_AGENT_STRING) storage/v2018_11_09/common/_serialization.py, ln 74, in _update_request request.path = url_quote(request.path, '/()$=\',~') lib/python3.8/urllib/parse.py, ln 844, in quote string = string.encode(encoding, errors) UnicodeEncodeError: 'utf-8' codec can't encode characters in position 2-3: surrogates not allowed ``` ## 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 blob download --account-name {} --container-name {} --name {} --file {}` ## Expected Behavior ## Environment Summary ``` macOS-11.2.1-x86_64-i386-64bit Python 3.8.9 Installer: HOMEBREW azure-cli 2.21.0 * Extensions: webapp 0.3.1 ``` ## Additional Context
Author: sebastiaanvandesteeg
Assignees: Juliehzl
Labels: `OKR3.2 Candidate`, `Service Attention`, `Storage`, `feature-request`
Milestone: Jul 2021 (2021-08-03)
evelyn-ys commented 3 years ago

Need storage data-plane SDK triage