azure-cli icon indicating copy to clipboard operation
azure-cli copied to clipboard

CLI fails to import "requests" package

Open geekzter opened this issue 9 years ago • 10 comments

Description

Outline the issue here: az login: 'ValueError: need more than 2 values to unpack'


Environment summary

Install Method: How did you install the CLI? (e.g. pip, interactive script, apt-get, Docker, MSI, nightly)
Answer here: curl -L https://aka.ms/InstallAzureCli | bash

CLI Version: What version of the CLI and modules are installed? (Use az --version)
Answer here: 2.0.6

OS Version: What OS and version are you using?
Answer here: macOS Sierra 10.12.5

Shell Type: What shell are you using? (e.g. bash, cmd.exe, Bash on Windows)
Answer here: terminal/bash

EVW-MBA-2013:~ eric$ az login Traceback (most recent call last): File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 162, in _run_module_as_main "main", fname, loader, pkg_name) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 72, in _run_code exec code in run_globals File "/Users/eric/lib/azure-cli/lib/python2.7/site-packages/azure/cli/main.py", line 23, in exit_code = azure.cli.main.main(args) File "/Users/eric/lib/azure-cli/lib/python2.7/site-packages/azure/cli/main.py", line 52, in main error_code = handle_exception(ex) File "/Users/eric/lib/azure-cli/lib/python2.7/site-packages/azure/cli/core/util.py", line 34, in handle_exception from msrestazure.azure_exceptions import CloudError File "/Users/eric/lib/azure-cli/lib/python2.7/site-packages/msrestazure/init.py", line 28, in from .azure_configuration import AzureConfiguration File "/Users/eric/lib/azure-cli/lib/python2.7/site-packages/msrestazure/azure_configuration.py", line 33, in from msrest import Configuration File "/Users/eric/lib/azure-cli/lib/python2.7/site-packages/msrest/init.py", line 27, in from .configuration import Configuration File "/Users/eric/lib/azure-cli/lib/python2.7/site-packages/msrest/configuration.py", line 36, in import requests File "/Users/eric/lib/azure-cli/lib/python2.7/site-packages/requests/init.py", line 49, in major, minor, patch = urllib3.version.split('.')[:3] ValueError: need more than 2 values to unpack

geekzter avatar May 27 '17 09:05 geekzter

met same problem. How to resolve it?

KylieLiang avatar May 27 '17 09:05 KylieLiang

I met this problem on FreeBSD 11.0 though curl -L https://aka.ms/InstallAzureCli | bash

KylieLiang avatar May 27 '17 09:05 KylieLiang

Same here.

Ubuntu 14.04.1

du8die avatar May 27 '17 13:05 du8die

Exactly the same problem as ericvanwijk; exactly same environment.

Darrens-MacBook-Pro:~ dazzur$ az login Traceback (most recent call last): File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 162, in _run_module_as_main "main", fname, loader, pkg_name) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 72, in _run_code exec code in run_globals File "/Users/dazzur/lib/azure-cli/lib/python2.7/site-packages/azure/cli/main.py", line 23, in exit_code = azure.cli.main.main(args) File "/Users/dazzur/lib/azure-cli/lib/python2.7/site-packages/azure/cli/main.py", line 52, in main error_code = handle_exception(ex) File "/Users/dazzur/lib/azure-cli/lib/python2.7/site-packages/azure/cli/core/util.py", line 34, in handle_exception from msrestazure.azure_exceptions import CloudError File "/Users/dazzur/lib/azure-cli/lib/python2.7/site-packages/msrestazure/init.py", line 28, in from .azure_configuration import AzureConfiguration File "/Users/dazzur/lib/azure-cli/lib/python2.7/site-packages/msrestazure/azure_configuration.py", line 33, in from msrest import Configuration File "/Users/dazzur/lib/azure-cli/lib/python2.7/site-packages/msrest/init.py", line 27, in from .configuration import Configuration File "/Users/dazzur/lib/azure-cli/lib/python2.7/site-packages/msrest/configuration.py", line 36, in import requests File "/Users/dazzur/lib/azure-cli/lib/python2.7/site-packages/requests/init.py", line 49, in major, minor, patch = urllib3.version.split('.')[:3] ValueError: need more than 2 values to unpack

dazzur avatar May 28 '17 06:05 dazzur

Same here on Raspberry03 File "/home/pi/lib/azure-cli/local/lib/python2.7/site-packages/requests/init.py", line 49, in major, minor, patch = urllib3.version.split('.')[:3] ValueError: need more than 2 values to unpack

Please resolve cause having a CLI on Raspi would be great!

floresboy avatar May 28 '17 09:05 floresboy

This issue is not az login specific, rather any commands sending http request on the wire should trigger this. Of course, az login usually is the first command you would run.

yugangw-msft avatar May 29 '17 00:05 yugangw-msft

your totally right, nonetheless a solution is greatly appreciated Thanks Kamiel

floresboy avatar May 29 '17 18:05 floresboy

We have made a new release with a fix that likely resolves this issue. Please verify, if still repro's please reactivate it

yugangw-msft avatar May 31 '17 01:05 yugangw-msft

verified on FreeBSD 11. Works. Thank you.

KylieLiang avatar May 31 '17 03:05 KylieLiang

Verified in macOS, thx.

geekzter avatar May 31 '17 14:05 geekzter