[python-ldap] ValueError: option error on trying to set OPT_X_TLS_CACERTFILE
michael at stroeder.com
Fri Feb 5 02:14:52 EST 2016
Peter Bengtsson wrote:
> 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
Most times this happens if the cert file does not exist.
> 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.
That sounds like a strange solution to me. But I have no personal experience
with with Max OS X.
P.S.: Please subscribe to the low-traffic python-ldap mailing list. So all the
answers really reach you.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 4245 bytes
Desc: S/MIME Cryptographic Signature
More information about the python-ldap