-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Homebrew Installed Azure CLI not working - ValueError: field 6 out of range (need a 48-bit value) #5184
Comments
Running into the same issue here. This looks related to uuid.py from the python framework getting a 64 bit hardware address for the loopback adapter in High Sierra, specifically in _ifconfig_getnode(). The function expects a 48 bit mac address, but is instead getting 64 bits back and converting it to an int value that is too long for the subsequent call in uuid.py. This is a sample output of the call to ifconfig that is being parsed:
As you can see, the lladdr is longer than the usual 48 bit mac address. This issue should ideally be addressed in the uuid.py module from the python project. I've created an issue in bugs.python.org for this: https://bugs.python.org/issue32502 |
+1 |
Did anyone find a solution? |
@derekbekoe, ty for the linkup to this ticket, sir. I missed this open status in my initial search. Any findings, I shall post back here. |
If anyone has steps to reproduce, it would help us provide a fix for this. |
Same issue here. This blocks all our automated script and make impossible to work on Azure. My output for
Environment summarymacOS High Sierra 10.13.3 Python and Azure cli installed with Homebrew. Output of
|
I suggest to mock the uuid call in a unit test to reproduce, as per https://bugs.python.org/issue32502 seems related to a new minor release of High Sierra and the network interface hardware. So, my guess is that there is no simple way to reproduce. |
Currently the upstream Python issue has been fixed and merged (1). Unfortunately a new 3.6 release (3.6.5) is not due until the end of March 2018 (2). Workaround for Python 3.6.4A risky workaround is possible manually substituting the
|
Created a PR that will switch to uuid4 if uuid1 raises the ValueError. |
Having installed azure-cli via homebrew I get the following python errors whenever I try and run a command. e.g. if I perform az login, or az --help, or other commands I get the following errors:-
$ az login
field 6 out of range (need a 48-bit value)
Traceback (most recent call last):
File "/usr/local/Cellar/azure-cli/2.0.23/libexec/lib/python3.6/site-packages/azure/cli/main.py", line 36, in main
cmd_result = APPLICATION.execute(args)
File "/usr/local/Cellar/azure-cli/2.0.23/libexec/lib/python3.6/site-packages/azure/cli/core/application.py", line 141, in execute
self.refresh_request_id()
File "/usr/local/Cellar/azure-cli/2.0.23/libexec/lib/python3.6/site-packages/azure/cli/core/application.py", line 269, in refresh_request_id
self.session['headers']['x-ms-client-request-id'] = str(uuid.uuid1())
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/uuid.py", line 606, in uuid1
clock_seq_hi_variant, clock_seq_low, node), version=1)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/uuid.py", line 168, in init
raise ValueError('field 6 out of range (need a 48-bit value)')
ValueError: field 6 out of range (need a 48-bit value)
Environment summary
Install Method (e.g. pip, interactive script, apt-get, Docker, MSI, edge build) / CLI version (
az --version
) / OS version / Shell Type (e.g. bash, cmd.exe, Bash on Windows)I installed via home-brew, having initially tried to install using the curl method, however this failed to build. The home-brew version installed fine, but just doesn't work.
$ az --version
azure-cli (2.0.23)
acr (2.0.17)
acs (2.0.22)
advisor (0.1.0)
appservice (0.1.22)
backup (1.0.3)
batch (3.1.7)
batchai (0.1.3)
billing (0.1.6)
cdn (0.0.10)
cloud (2.0.10)
cognitiveservices (0.1.9)
command-modules-nspkg (2.0.1)
configure (2.0.12)
consumption (0.2.0)
container (0.1.15)
core (2.0.23)
cosmosdb (0.1.15)
dla (0.0.15)
dls (0.0.18)
eventgrid (0.1.5)
extension (0.0.6)
feedback (2.0.6)
find (0.2.7)
interactive (0.3.11)
iot (0.1.15)
keyvault (2.0.15)
lab (0.0.13)
monitor (0.0.13)
network (2.0.19)
nspkg (3.0.1)
profile (2.0.16)
rdbms (0.0.9)
redis (0.2.10)
reservations (0.1.0)
resource (2.0.19)
role (2.0.15)
servicefabric (0.0.7)
sql (2.0.17)
storage (2.0.21)
vm (2.0.20)
Python location '/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6'
Extensions directory '/Users/markread/.azure/cliextensions'
Python (Darwin) 3.6.4 (v3.6.4:d48ecebad5, Dec 18 2017, 21:07:28)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)]
Legal docs and information: aka.ms/AzureCliLegal
The text was updated successfully, but these errors were encountered: