Skip to content

Warning 'Received non-bytes value' is not helpful #108

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

Closed
tiran opened this issue Dec 6, 2017 · 1 comment
Closed

Warning 'Received non-bytes value' is not helpful #108

tiran opened this issue Dec 6, 2017 · 1 comment
Milestone

Comments

@tiran
Copy link
Member

tiran commented Dec 6, 2017

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

tiran added a commit to tiran/python-ldap that referenced this issue Dec 6, 2017
Closes: python-ldap#108
Signed-off-by: Christian Heimes <cheimes@redhat.com>
@tiran
Copy link
Member Author

tiran commented Dec 6, 2017

PR #109 is a proof of concept to use correct stack levels. python-ldap uses up to three, maybe for stack levels for methods, so it's getting ugly. :/

tiran added a commit to tiran/python-ldap that referenced this issue Dec 6, 2017
Closes: python-ldap#108
Signed-off-by: Christian Heimes <cheimes@redhat.com>
tiran added a commit to tiran/python-ldap that referenced this issue Dec 11, 2017
Closes: python-ldap#108
Signed-off-by: Christian Heimes <cheimes@redhat.com>
@encukou encukou added this to the 3.0 milestone Dec 11, 2017
tiran added a commit to tiran/python-ldap that referenced this issue Dec 12, 2017
Closes: python-ldap#108
Signed-off-by: Christian Heimes <cheimes@redhat.com>
encukou pushed a commit to encukou/python-ldap that referenced this issue Dec 13, 2017
Closes: python-ldap#108
Signed-off-by: Christian Heimes <cheimes@redhat.com>
Some simplification by: Petr Viktorin
encukou pushed a commit to encukou/python-ldap that referenced this issue Dec 13, 2017
Closes: python-ldap#108
Signed-off-by: Christian Heimes <cheimes@redhat.com>
Some simplification by: Petr Viktorin
encukou pushed a commit to encukou/python-ldap that referenced this issue Dec 13, 2017
Closes: python-ldap#108
Signed-off-by: Christian Heimes <cheimes@redhat.com>
Some simplification by: Petr Viktorin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants