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

Peter Bengtsson pbengtsson at mozilla.com
Mon Feb 8 14:05:05 EST 2016


On Mon, Feb 8, 2016 at 12:01 PM, Michael Ströder <michael at stroeder.com>
wrote:

> Peter Bengtsson wrote:
> > I wonder if there's a way to enable more debug or tracing to get a more
> > descriptive error.
>
> Please examine Demo/initialize.py to see how to turn on python-ldap's
> internal
> trace log and/or libldap's debug log.
>
>
The error happens before initialize, but I played with setting _trace_level

>>> import ldap
>>> ldap._trace_level = 7
>>>
CACERTFILE='/Users/peterbe/dev/MOZILLA/MEDLEM/ldap-bind/medlem/ldapproxy-medlem.crt'
>>> ldap.set_option(ldap.OPT_X_TLS_CACERTFILE, CACERTFILE)
*** _ldap.set_option ((24578,

'/Users/peterbe/dev/MOZILLA/MEDLEM/ldap-bind/medlem/ldapproxy-medlem.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




> Ciao, Michael.
>
>
>


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


More information about the python-ldap mailing list