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
builtins.TypeError: startswith first arg must be str or a tuple of str, not bytes #156
Comments
Hello, We're having the exact same issue. We fixed with via this patch, but I'm not sure it's the correct way to do it. --- /tmp/entryhelpers.py 2021-11-24 10:07:06.132309580 +0100
+++ entryhelpers.py 2021-11-24 10:06:47.395604502 +0100
@@ -166,6 +166,10 @@
return False
possibleMatches = self[filter.type]
+ for substring in filter.substrings:
+ if isinstance(substring.value, bytes):
+ substring.value = substring.value.decode("utf-8")
+
substrings = filter.substrings[:]
if substrings and isinstance( I can create a PR if that the correct way to fix it or if pointer in the right direction :) Thanks, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I read the tutorial https://ldaptor.readthedocs.io/en/latest/quickstart.html and learned how to load LDAP entries from a static LDIF. Since I want to load contact from SQL database, I raised a question and get help from a kind response here #154
I tried the code below, and sent a query from Microsoft Outlook, but my program raised an error
The error information is
here x is a plain string while the filter values are byte.
The text was updated successfully, but these errors were encountered: