Opened 15 years ago
Last modified 2 years ago
#5406 new defect
ProgrammingError: can't adapt when opening Users page
Reported by: | anonymous | Owned by: | |
---|---|---|---|
Priority: | high | Component: | UserManagerPlugin |
Severity: | blocker | Keywords: | postgresql psycopg internal error programmingerror |
Cc: | Trac Release: | 0.11 |
Description
Trac 0.11 installed + AccountManagerPlugin 0.11 + UserManagerPlugin 0.11. SessionStore set, I'm using PostgreSQL. AccountManager users page disabled,.
When trying to enter Users page (UserManager's one) I get:
Oops… Trac detected an internal error: ProgrammingError: can't adapt
See screenshot for more details. Complete trackback here:
File "/usr/lib/python2.6/site-packages/Trac-0.11-py2.6.egg/trac/web/main.py", line 423, in _dispatch_request dispatcher.dispatch(req) File "/usr/lib/python2.6/site-packages/Trac-0.11-py2.6.egg/trac/web/main.py", line 219, in dispatch data, content_type) File "/usr/lib/python2.6/site-packages/Trac-0.11-py2.6.egg/trac/web/chrome.py", line 726, in render_template stream.render(method, doctype=doctype, out=buffer) File "/usr/lib/python2.6/site-packages/genshi/core.py", line 179, in render return encode(generator, method=method, encoding=encoding, out=out) File "/usr/lib/python2.6/site-packages/genshi/output.py", line 61, in encode for chunk in iterator: File "/usr/lib/python2.6/site-packages/genshi/output.py", line 311, in __call__ for kind, data, pos in stream: File "/usr/lib/python2.6/site-packages/genshi/output.py", line 753, in __call__ for kind, data, pos in stream: File "/usr/lib/python2.6/site-packages/genshi/output.py", line 592, in __call__ for kind, data, pos in stream: File "/usr/lib/python2.6/site-packages/genshi/output.py", line 698, in __call__ for kind, data, pos in chain(stream, [(None, None, None)]): File "/usr/lib/python2.6/site-packages/genshi/output.py", line 532, in __call__ for ev in stream: File "/usr/lib/python2.6/site-packages/genshi/core.py", line 283, in _ensure for event in stream: File "/usr/lib/python2.6/site-packages/genshi/core.py", line 283, in _ensure for event in stream: File "/usr/lib/python2.6/site-packages/Trac-0.11-py2.6.egg/trac/web/chrome.py", line 779, in _strip_accesskeys for kind, data, pos in stream: File "/usr/lib/python2.6/site-packages/genshi/core.py", line 283, in _ensure for event in stream: File "/usr/lib/python2.6/site-packages/Trac-0.11-py2.6.egg/trac/web/chrome.py", line 768, in _generate for kind, data, pos in stream: File "/usr/lib/python2.6/site-packages/genshi/template/base.py", line 569, in _include for event in stream: File "/usr/lib/python2.6/site-packages/genshi/template/markup.py", line 298, in _match ctxt, start=idx + 1, **vars): File "/usr/lib/python2.6/site-packages/genshi/template/markup.py", line 298, in _match ctxt, start=idx + 1, **vars): File "/usr/lib/python2.6/site-packages/genshi/template/markup.py", line 298, in _match ctxt, start=idx + 1, **vars): File "/usr/lib/python2.6/site-packages/genshi/template/markup.py", line 245, in _match for event in stream: File "/usr/lib/python2.6/site-packages/genshi/template/base.py", line 543, in _exec for event in stream: File "/usr/lib/python2.6/site-packages/genshi/template/base.py", line 533, in _eval for event in substream: File "/usr/lib/python2.6/site-packages/genshi/template/base.py", line 496, in _eval for kind, data, pos in stream: File "/usr/lib/python2.6/site-packages/genshi/template/base.py", line 551, in _flatten for event in stream: File "/usr/lib/python2.6/site-packages/genshi/core.py", line 283, in _ensure for event in stream: File "/usr/lib/python2.6/site-packages/genshi/path.py", line 141, in _generate subevent = stream.next() File "/usr/lib/python2.6/site-packages/genshi/template/base.py", line 569, in _include for event in stream: File "/usr/lib/python2.6/site-packages/genshi/template/markup.py", line 234, in _strip event = stream.next() File "/usr/lib/python2.6/site-packages/genshi/template/base.py", line 543, in _exec for event in stream: File "/usr/lib/python2.6/site-packages/genshi/template/base.py", line 533, in _eval for event in substream: File "/usr/lib/python2.6/site-packages/genshi/template/base.py", line 496, in _eval for kind, data, pos in stream: File "/usr/lib/python2.6/site-packages/genshi/template/base.py", line 551, in _flatten for event in stream: File "/usr/lib/python2.6/site-packages/genshi/core.py", line 283, in _ensure for event in stream: File "/usr/lib/python2.6/site-packages/genshi/path.py", line 141, in _generate subevent = stream.next() File "/usr/lib/python2.6/site-packages/genshi/template/base.py", line 569, in _include for event in stream: File "/usr/lib/python2.6/site-packages/genshi/template/markup.py", line 234, in _strip event = stream.next() File "/usr/lib/python2.6/site-packages/genshi/template/base.py", line 543, in _exec for event in stream: File "/usr/lib/python2.6/site-packages/genshi/template/base.py", line 533, in _eval for event in substream: File "/usr/lib/python2.6/site-packages/genshi/template/base.py", line 496, in _eval for kind, data, pos in stream: File "/usr/lib/python2.6/site-packages/genshi/template/base.py", line 551, in _flatten for event in stream: File "/usr/lib/python2.6/site-packages/genshi/core.py", line 283, in _ensure for event in stream: File "/usr/lib/python2.6/site-packages/genshi/path.py", line 141, in _generate subevent = stream.next() File "/usr/lib/python2.6/site-packages/genshi/template/base.py", line 569, in _include for event in stream: File "/usr/lib/python2.6/site-packages/genshi/template/markup.py", line 234, in _strip event = stream.next() File "/usr/lib/python2.6/site-packages/genshi/template/base.py", line 543, in _exec for event in stream: File "/usr/lib/python2.6/site-packages/genshi/template/base.py", line 496, in _eval for kind, data, pos in stream: File "/usr/lib/python2.6/site-packages/genshi/template/base.py", line 558, in _flatten for event in self._flatten(substream, ctxt, **vars): File "/usr/lib/python2.6/site-packages/genshi/template/base.py", line 551, in _flatten for event in stream: File "/usr/lib/python2.6/site-packages/genshi/template/directives.py", line 377, in __call__ for item in iterable: File "/usr/lib/python2.6/site-packages/Trac-0.11-py2.6.egg/trac/util/compat.py", line 81, in next self.currkey = self.keyfunc(self.currvalue) File "<string>", line 1, in <lambda.1>File "build/bdist.linux-i686/egg/acct_mgr/api.py", line 114, in has_userFile "build/bdist.linux-i686/egg/acct_mgr/db.py", line 39, in has_userFile "/usr/lib/python2.6/site-packages/Trac-0.11-py2.6.egg/trac/db/util.py", line 50, in execute return self.cursor.execute(sql_escape_percent(sql), args) File "/usr/lib/python2.6/site-packages/Trac-0.11-py2.6.egg/trac/db/util.py", line 50, in execute return self.cursor.execute(sql_escape_percent(sql), args)
System information:
System Information: User Agent: Opera/9.80 (X11; Linux i686; U; pl) Presto/2.2.15 Version/10.00Trac: 0.11 Python: 2.6.2 (r262, Jun 15 2009, 00:07:25) [GCC 4.1.1 (Gentoo 4.1.1-r3)] setuptools: 0.6c9 psycopg2: 2.0.11 Genshi: 0.5.1 Pygments: 1.0 GIT: 1.6.0.6 jQuery: 1.2.3
Attachments (2)
Change History (7)
Changed 15 years ago by
Attachment: | usermanagerplugin_cantadapt_issue.png added |
---|
Changed 15 years ago by
comment:2 Changed 14 years ago by
I am seeing the same, with AccountManagerPlugin and UserManagerPlugin up-to-date, and a fairly recent 0.12-ish trunk of Trac.
comment:3 Changed 14 years ago by
I have found a fix/workaround for this issue - exchange
lambda nn: nn.is_trac_managed_hack is True or account_manager.has_user(nn.username)
with
lambda nn: nn.is_trac_managed_hack is True or account_manager.has_user(nn.username if nn.username in globals() else None)
on line 21 of templates/admin_um.html
Note that I have no idea of the real reason, as that particular line to me appears to be the worst possible abuse of Genshi and python lambdas. Also I do not know if this will work for other Trac/acct_mngr/user_mngr configurations.
comment:4 Changed 11 years ago by
Owner: | changed from Catalin BALAN to Ryan J Ollos |
---|---|
Status: | new → assigned |
comment:5 Changed 5 years ago by
Owner: | Ryan J Ollos deleted |
---|---|
Status: | assigned → new |
configuration file