This error is given by python-ldap on Python 2.x on certain operations when it receives unicode objects where it expects a str object. Make sure any strings you pass into python-ldap are string type, not unicode type, and this problem will go away. :)