ValueError: option error in Django / Python

2019-08-12 08:27发布

问题:

I'm building a django website and trying to implement LDAP to it.

Whenever I call ldap.set_option(), I get this error:

ValueError: option error

Any idea why this is happening?

This is the document I'm following.

Thanks for looking into this and greatly appreciate your help!

回答1:

http://packages.python.org/django-auth-ldap/#auth-ldap-global-options

Is AUTH_LDAP_GLOBAL_OPTIONS defined and does it have items in it?

Perhaps it is not defined?