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

Patrick Carlson pcarlson at redhat.com
Wed Jul 20 13:01:37 EDT 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>
>   File
> "/Users/peterbe/virtualenvs/medlem/lib/python2.7/site-packages/
python_ldap-2.4.25-py2.7-macosx-10.11-x86_64.egg/ldap/functions.py",
> line 133, in set_option
>     return _ldap_function_call(None,_ldap.set_option,option,invalue)
>   File
> "/Users/peterbe/virtualenvs/medlem/lib/python2.7/site-packages/
python_ldap-2.4.25-py2.7-macosx-10.11-x86_64.egg/ldap/functions.py",
> line 64, in _ldap_function_call
>     result = func(*args,**kwargs)
> ValueError: option error

Was this issue ever solved? I've been working with python-ldap
recently and have come across the same issue. I know the cert file exists
and i've used the cert filed when working with openldap. 



More information about the python-ldap mailing list