[python-ldap] ValueError: option error on trying to set OPT_X_TLS_CACERTFILE

Peter Bengtsson pbengtsson at mozilla.com
Thu Feb 4 16:43:15 EST 2016

I'm on OSX 10.11.3 and I installed python-ldap 2.4.25 with pip in a
virtualenv. And I always get this error:

>>> import ldap
>>> ldap.set_option(ldap.OPT_X_TLS_CACERTFILE, '/path/to.crt')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
line 133, in set_option
    return _ldap_function_call(None,_ldap.set_option,option,invalue)
line 64, in _ldap_function_call
    result = func(*args,**kwargs)
ValueError: option error

It doesn't matter what the value of that option is.
It does not happen when installed on Ubuntu.

Axel here, http://stackoverflow.com/a/29101851/205832 said he managed to
make the problem go away by downloading the tarball and adding /usr/local
to setup.cfg. That did not help for me.

For what it's worth, I *have* /usr/include/sasl/ on my disk.


Peter Bengtsson
Mozilla Tools & Services
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ldap/attachments/20160204/069f841d/attachment.html>

More information about the python-ldap mailing list