7

Hi I am trying to import 'LDAPBindError' from the ldap3 library and I am getting an import error. Can somebody please explain why this is not working?

from ldap3 import Server, Connection, ALL, LDAPBindError, SUBTREE, ALL_ATTRIBUTES,MODIFY_REPLACE

ImportError: cannot import name 'LDAPBindError'

I am using the following versions

pip3.6 list |grep ldap3 ldap3 (2.5)

python3.6 --version Python 3.6.4

user1768233
  • 1,409
  • 3
  • 20
  • 28

1 Answers1

6

All credit goes to Sraw, just adding the answer here because I originally missed it in the comments:

from ldap3.core.exceptions import LDAPBindError

The modules in ldap3 are organized into packages. I have not found specific documentation for this.

Nagev
  • 10,835
  • 4
  • 58
  • 69