[python3-ldap] Problem retrieving UUID
Damiano Scrigni
damiano.scrigni at badbit.it
Thu Mar 12 12:47:56 CET 2015
Hello everyone,
Does anyone has this problem when retrieving an UUID attribute?
lib\site-packages\ldap3\protocol\formatters\formatters.py", line 64, in format_uuid
return str(UUID(bytes=raw_value))
File "C:\Python34\Lib\uuid.py", line 148, in __init__
raise ValueError('bytes is not a 16-char string')
ValueError: bytes is not a 16-char string
I have found that changing line 64 in ldap3\protocol\formatters\formatters.py from:
return str(UUID(bytes=raw_value))
to:
return str(UUID(raw_value.decode("ASCII")))
solves the problem, but I have no idea about the side effects of the change.
Bye,
damiano
More information about the python3-ldap
mailing list