The Received non-bytes value warning isn't helpful at all. The warning message only contains ldap/ldapobject.py as caller information, not the actual caller. It might be enough to increment the stack level of the warning by one.
Example:
/usr/lib64/python2.7/site-packages/ldap/ldapobject.py:396: BytesWarning: Received non-bytes value u'givenname' with default (disabled) bytes mode; please choose an explicit option for bytes_mode on your LDAP connection
The
Received non-bytes valuewarning isn't helpful at all. The warning message only containsldap/ldapobject.pyas caller information, not the actual caller. It might be enough to increment the stack level of the warning by one.Example:
/usr/lib64/python2.7/site-packages/ldap/ldapobject.py:396: BytesWarning: Received non-bytes value u'givenname' with default (disabled) bytes mode; please choose an explicit option for bytes_mode on your LDAP connection