Why does "Unable to activate ldap. The "python-ldap" library is missing." message displayed?

Issue #514 wontfix
Former user created an issue

I have already installed "python-ldap", but when I set up ldap settings, "Unable to activate ldap. The "python-ldap" library is missing." message always is displayed.

Why does the message displayed?

I have confirmed "python-ldap" is installed as below.

(rhodecode-venv)[root@localhost rhodecode]# pip freeze Babel==0.9.6 Beaker==1.6.3 FormEncode==1.2.4 Mako==0.7.0 Markdown==2.1.1 MarkupSafe==0.15 Paste== PasteDeploy==1.5.0 PasteScript==1.7.5 Pygments==1.5 Pylons==1.0 RhodeCode==1.3.6 Routes==1.13 SQLAlchemy==0.7.6 Tempita==0.5.1 WebError==0.10.3 WebHelpers==1.3 WebOb==1.0.8 WebTest==1.3.4 Whoosh==2.4.1 amqplib==1.0.2 anyjson==0.3.3 celery==2.2.10 decorator==3.3.3 docutils==0.8.1 dulwich==0.8.5 kombu==1.5.1 mercurial==2.2.3 nose==1.1.2 py-bcrypt==0.2 pyparsing==1.5.6 pysqlite==2.6.3 python-dateutil==1.5 python-ldap==2.4.10 repoze.lru==0.6 simplejson==2.5.2 wsgiref==0.1.2

Comments (10)

  1. Shin Yamamoto

    This problem was resolved. That is because "pip install python-ldap" is not working correctly. This wad confirmed to execute the below command.

    $python -c 'import ldap;'

    and then error occurred:(

    So instead of using pip, I built and installed it from python-ldap source using customized setup.cfg. http://pypi.python.org/pypi/python-ldap/ http://www.python-ldap.org/doc/html/installing.html

    Now "Ldap settings updated successfully" is displayed when I set up ldap settings. I have not confirmed if rhodenode connects to my AD server because I can not login by my AD account. But this is other problem, maybe I mistake ldap settings.

    As the result, this issue need not to be fixed.

  2. Vittorio Schiavinato

    Hi, I have the same error with rhodecode 1.4.3. I have upgraded the python-ldap to 2.4.10 but the error persists. Have you any idea?

  3. Marek Hudik

    I have the same issue with Rhodecode 1.5.4. On CentOS I installed python-ldap 2.4.10 and openldap-devel libraries and still having this message.

    According to thodecode/venv/lib/python2.6/site-packages/rhodecode/controllers/admin/ldap_settings.py this message gets displayed when condition: if not ldap_active

    Some tip?

  4. Marcin Kuzminski repo owner

    Maybe it's an issue with virtual env.

    Try to check if the lib is really in the venv python

    python -c "import ldap"

    Should fail if there is a problem.

  5. Marek Hudik

    I tried that. That test looks fine:

    [root@mercurial ~]# python -c "import ldap" 
    [root@mercurial ~]# 
  6. Log in to comment