Opened 10 years ago

# Ldap plugin general problem

Reported by: Owned by: stoychev@… Emmanuel Blot high LdapPlugin normal 0.10

### Description

Hello! I've done some settings with trac including LdapPlugin-0.5.1dev-py2.4.egg. I've read manual but still can't make it work.

Traceback (most recent call last):
File "/var/lib/python-support/python2.4/trac/web/main.py", line 387, in dispatch_request
dispatcher.dispatch(req)
File "/var/lib/python-support/python2.4/trac/web/main.py", line 183, in dispatch
req.perm = PermissionCache(self.env, req.authname)
File "/var/lib/python-support/python2.4/trac/perm.py", line 263, in __init__
File "/var/lib/python-support/python2.4/trac/perm.py", line 227, in get_user_permissions
File "build/bdist.linux-i686/egg/ldapplugin/api.py", line 205, in get_user_permissions
File "build/bdist.linux-i686/egg/ldapplugin/api.py", line 108, in get_permission_groups
File "build/bdist.linux-i686/egg/ldapplugin/api.py", line 149, in _get_user_groups
File "build/bdist.linux-i686/egg/ldapplugin/api.py", line 541, in get_groups
File "build/bdist.linux-i686/egg/ldapplugin/api.py", line 564, in get_dn
File "build/bdist.linux-i686/egg/ldapplugin/api.py", line 647, in _search
File "build/bdist.linux-i686/egg/ldapplugin/api.py", line 640, in _open
TypeError: unsubscriptable object


Please give any suggestions :( Distro is Debian lenny/sid

### comment:1 Changed 10 years ago by Emmanuel Blot

Ok, it seems there is an error with the LDAP connection, and the trace message you're observing is a second-level issue: while attempting to print out the error, a second exception is triggered when accessing the error message.. I should have made this code more robust.

Meanwhile, can you try to replace line 640 of api.py with:

raise TracError("Unable to open LDAP cnx: %s" % e)


to see whether you can get the original error.

It also would help if you have access to the LDAP server log message.

logs i mean :)

### comment:4 in reply to:  2 Changed 10 years ago by Emmanuel Blot

There's something wrong: you should get an error trace, but the message should be different (as there is no array in the code, no "unsubscriptable object" exception can be triggered.

Did you restart the server after the change - and if you've installed the plugin as an egg, have you rebuilt the egg file and re-installed it?

### comment:5 follow-up:  6 Changed 10 years ago by anonymous

The servers were restarted and plugin was build again, but the case is same :( Still this messages.

### comment:6 in reply to:  5 Changed 10 years ago by Emmanuel Blot

The servers were restarted and plugin was build again, but the case is same :( Still this messages.

There is an issue w/ your installation: raise TracError("Unable to open LDAP cnx: %s" % e) cannot trigger unsubscriptable object exception.

Something went wrong when you applied the patch.

### comment:7 follow-up:  8 Changed 10 years ago by anonymous

Hello I've did it again and again and received same errors :( I've installed Track 0.10.4 is it ok?

### comment:8 in reply to:  7 Changed 10 years ago by anonymous

Hello I've did it again and again and received same errors :( I've installed Track 0.10.4 is it ok?

P.S. I mean .. Did you test it with this version?

### Modify Ticket

Change Properties