Skip to content

Bug fix for 'ValueError: field 6 out of range (need a 48-bit value)'#5644

Merged
derekbekoe merged 1 commit into
Azure:devfrom
derekbekoe:uuid-fix
Feb 22, 2018
Merged

Bug fix for 'ValueError: field 6 out of range (need a 48-bit value)'#5644
derekbekoe merged 1 commit into
Azure:devfrom
derekbekoe:uuid-fix

Conversation

@derekbekoe

@derekbekoe derekbekoe commented Feb 22, 2018

Copy link
Copy Markdown
Member

Closes #5184


This checklist is used to make sure that common guidelines for a pull request are followed.

General Guidelines

  • The PR has modified HISTORY.rst describing any customer-facing, functional changes. Note that this does not include changes only to help content. (see Modifying change log).

@promptws

Copy link
Copy Markdown

View a preview at https://prompt.ws/r/Azure/azure-cli/5644
This is an experimental preview for @microsoft users.

@derekbekoe derekbekoe added this to the Sprint 32 milestone Feb 22, 2018
@derekbekoe derekbekoe added the P1 label Feb 22, 2018
@derekbekoe

Copy link
Copy Markdown
Member Author

uuid1 is preferred since that uses the device MAC address but since that can raise a ValueError, we'll fallback to uuid4 which is just a random UUID.

Also, they both give the same format so there'll be no noticeable difference:

$ python
>>> import uuid
>>> uuid.uuid1()
UUID('49abe71e-17fe-11e8-8731-6a0000ab8250')
>>> uuid.uuid4()
UUID('5229405e-6207-4fa8-a36e-98df6e9cf527')
>>> 

https://docs.python.org/3/library/uuid.html#uuid.uuid1
https://stackoverflow.com/questions/1785503/when-should-i-use-uuid-uuid1-vs-uuid-uuid4-in-python

@derekbekoe derekbekoe merged commit d3aebfd into Azure:dev Feb 22, 2018
@derekbekoe derekbekoe deleted the uuid-fix branch February 22, 2018 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Homebrew Installed Azure CLI not working - ValueError: field 6 out of range (need a 48-bit value)

4 participants