Modify ↓
#12546 closed defect (cantfix)
TypeError: 'int' object has no attribute '__getitem__'
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | general | Version: | 1.0.2 |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
How to Reproduce
While doing a GET operation on /
, Trac issued an internal error.
(please provide additional details here)
Request parameters:
{}
User agent: Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Dragon/50.14.22.465 Chrome/50.0.2661.102 Safari/537.36
System Information
System information not available
Enabled Plugins
Plugin information not available
Python Traceback
Traceback (most recent call last): File "build/bdist.linux-x86_64/egg/trac/web/main.py", line 512, in _dispatch_request dispatcher.dispatch(req) File "build/bdist.linux-x86_64/egg/trac/web/main.py", line 221, in dispatch resp = chosen_handler.process_request(req) File "build/bdist.linux-x86_64/egg/trac/wiki/web_ui.py", line 134, in process_request req.perm(versioned_page.resource).require('WIKI_VIEW') File "build/bdist.linux-x86_64/egg/trac/perm.py", line 577, in require if not self._has_permission(action, resource): File "build/bdist.linux-x86_64/egg/trac/perm.py", line 568, in _has_permission check_permission(action, perm.username, resource, perm) File "build/bdist.linux-x86_64/egg/trac/perm.py", line 460, in check_permission perm) File "build/bdist.linux-x86_64/egg/trac/perm.py", line 294, in check_permission get_user_permissions(username) File "build/bdist.linux-x86_64/egg/trac/perm.py", line 396, in get_user_permissions for perm in self.store.get_user_permissions(username) or []: File "build/bdist.linux-x86_64/egg/ldapplugin/api.py", line 206, in get_user_permissions users += list(provider.get_permission_groups(username)) File "build/bdist.linux-x86_64/egg/ldapplugin/api.py", line 109, in get_permission_groups ldapgroups = self._get_user_groups(username) File "build/bdist.linux-x86_64/egg/ldapplugin/api.py", line 150, in _get_user_groups ldap_groups = self._ldap.get_groups() File "build/bdist.linux-x86_64/egg/ldapplugin/api.py", line 554, in get_groups groups = self.get_dn(self.basedn, 'objectclass=' + self.groupname) File "build/bdist.linux-x86_64/egg/ldapplugin/api.py", line 577, in get_dn sr = self._search(basedn, filterstr, ['dn'], ldap.SCOPE_SUBTREE) File "build/bdist.linux-x86_64/egg/ldapplugin/api.py", line 660, in _search self._open() File "build/bdist.linux-x86_64/egg/ldapplugin/api.py", line 653, in _open raise TracError("Unable to open LDAP cnx: %s" % e[0]['desc']) TypeError: 'int' object has no attribute '__getitem__'
Attachments (0)
Change History (5)
comment:1 by , 8 years ago
comment:2 by , 8 years ago
Resolution: | → cantfix |
---|---|
Status: | new → closed |
comment:3 by , 8 years ago
Thanks fo answer, But how can I find "ldapplugin/0.12/ldapplugin/api.py" and edit?
Note:
See TracTickets
for help on using tickets.
PluginIssue (th:LdapPlugin). Please report to the plugin maintainers via trac-hacks.org.
Anyway, it seems the error is raised while formatting error message about LDAP. Try the following patch. Also, I guess incorrect configurations lead the original error.
ldapplugin/0.12/ldapplugin/api.py