Describe the bug
az aks install-cli fails on windows
To Reproduce
az aks install-cli on windows
Expected behavior
installs kubectl
Additional context
C:\Users\scott\Desktop\foofoo> az aks install-cli
cannot import name 'SFTPAttributes'
Traceback (most recent call last):
File "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\Lib\site-packages\knack\cli.py", line 197, in invoke
cmd_result = self.invocation.execute(args)
File "C:\Users\troyd\AppData\Local\Temp\pip-install-_jje8pgf\azure-cli-core\azure\cli\core\commands\__init__.py", line 262, in execute
File "C:\Users\troyd\AppData\Local\Temp\pip-install-_jje8pgf\azure-cli-core\azure\cli\core\__init__.py", line 253, in load_arguments
File "C:\Users\troyd\AppData\Local\Temp\pip-install-_jje8pgf\azure-cli-core\azure\cli\core\commands\__init__.py", line 141, in load_arguments
File "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\Lib\site-packages\knack\commands.py", line 76, in load_arguments
cmd_args = self.arguments_loader()
File "C:\Users\troyd\AppData\Local\Temp\pip-install-_jje8pgf\azure-cli-core\azure\cli\core\__init__.py", line 440, in default_arguments_loader
File "C:\Users\troyd\AppData\Local\Temp\pip-install-_jje8pgf\azure-cli-core\azure\cli\core\__init__.py", line 485, in get_op_handler
File "importlib\__init__.py", line 126, in import_module
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "C:\Users\troyd\AppData\Local\Temp\pip-install-_jje8pgf\azure-cli-acs\azure\cli\command_modules\acs\custom.py", line 36, in <module>
File "C:\Users\troyd\AppData\Local\Temp\pip-install-_jje8pgf\azure-cli-acs\azure\cli\command_modules\acs\acs_client.py", line 12, in <module>
File "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\Lib\site-packages\paramiko\__init__.py", line 22, in <module>
from paramiko.transport import SecurityOptions, Transport
File "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\Lib\site-packages\paramiko\transport.py", line 70, in <module>
from paramiko.sftp_client import SFTPClient
File "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\Lib\site-packages\paramiko\sftp_client.py", line 41, in <module>
from paramiko.sftp_attr import SFTPAttributes
ImportError: cannot import name 'SFTPAttributes'
cc/ @shanselman
@devigned I was unable to reproduce this behavior on Windows 10 with the current az CLI 2.0.54.
What version of the CLI are you using? Did you use the MSI Installer from https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-windows?view=azure-cli-latest ?
Can't reproduce as well using the latest CLI. Based on the stack trace, it was a pretty old version dating back to when Troy did the release around last August.
Suggest close it and reactivate when there is a repro using newer builds
Same. I just ran it on a clean box. I think we are good to close.
Thanks for your patience and for trying. If/when I get a good repro, how do I capture it? Is there a "collectlogs" script or something to effectively capture state? I've been in this state a few times on a few machines. I'm in this state now on 2.0.44 - I will update first to latest.
Ok, updated to latest and now it works. Closed. I appreciate you all!
If/when I get a good repro, how do I capture it?
az --version and running the command with --debug are helpful, but I don't think there's a way to capture the CLI state for inspecting.
Most helpful comment
Ok, updated to latest and now it works. Closed. I appreciate you all!