Modify ↓
#5183 closed defect (fixed)
error with 0.11: TypeError: post_process_request() takes exactly 4 arguments (5 given)
| Reported by: | Owned by: | Sebastian Marek | |
|---|---|---|---|
| Priority: | normal | Component: | PeerReviewPlugin |
| Severity: | normal | Keywords: | |
| Cc: | Trac Release: | 0.11 |
Description
After installation of the current 0.11 branch plugin (I also tried trunk), the Peer Review link appears in the menu.
Clicking on it leads to the following error page.
Trac detected an internal error:
TypeError: post_process_request() takes exactly 4 arguments (5 given)
If you think this should work you can reproduce the problem, you should consider reporting this to the Trac team.
Before you do that, though, please first try searching for similar issues, as it is quite likely that this problem has been reported before. For questions about installation and configuration of Trac, please try the mailing list instead of filing a ticket.
Otherwise, please ==== How to Reproduce ==== While doing a GET operation on `/peerReviewMain`, Trac issued an internal error. ''(please provide additional details here)'' User Agent was: `Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.17) Gecko/20080924 Ubuntu/8.04 (hardy) Firefox/2.0.0.17` ==== System Information ==== || '''Trac''' || `0.11` || || '''Python''' || `2.5.2 (r252:60911, Apr 21 2008, 11:29:43) ` [[br]] `[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)]` || || '''setuptools''' || `0.6c8` || || '''SQLite''' || `3.4.2` || || '''pysqlite''' || `2.3.2` || || '''Genshi''' || `0.5.1` || || '''mod_python''' || `3.3.1` || || '''Mercurial''' || `1.0.1` || || '''jQuery:''' || `1.2.3` || ==== Python Traceback ==== {{{ Traceback (most recent call last): File "/usr/lib/python2.5/site-packages/Trac-0.11-py2.5.egg/trac/web/main.py", line 423, in _dispatch_request dispatcher.dispatch(req) File "/usr/lib/python2.5/site-packages/Trac-0.11-py2.5.egg/trac/web/main.py", line 202, in dispatch self._post_process_request(req, *resp) File "/usr/lib/python2.5/site-packages/Trac-0.11-py2.5.egg/trac/web/main.py", line 299, in _post_process_request resp = f.post_process_request(req, *resp) TypeError: post_process_request() takes exactly 4 arguments (5 given) }}} a new ticket at the Trac project site, where you can describe the problem and explain how to reproduce it.
Python Traceback
Most recent call last:
* File "/usr/lib/python2.5/site-packages/Trac-0.11-py2.5.egg/trac/web/main.py", line 423, in _dispatch_request
Code fragment:
418. try:
419. if not env and env_error:
420. raise HTTPInternalError(env_error)
421. try:
422. dispatcher = RequestDispatcher(env)
423. dispatcher.dispatch(req)
424. except RequestDone:
425. pass
426. resp = req._response or []
427.
428. except HTTPException, e:
Local variables:
Name Value
after [u' except RequestDone:', u' pass', u' resp = ...
before [u' try:', u' if not env and env_error:', u' raise ...
dispatcher <trac.web.main.RequestDispatcher object at 0x90633ac>
e TypeError('post_process_request() takes exactly 4 arguments (5 given)',)
env <trac.env.Environment object at 0x904f3cc>
env_error None
exc_info (<type 'exceptions.TypeError'>, TypeError('post_process_request() takes ...
filename '/usr/lib/python2.5/site-packages/Trac-0.11-py2.5.egg/trac/web/main.py'
frames [{'function': '_dispatch_request', 'lines_before': [u' try:', u' ...
has_admin True
line u' dispatcher.dispatch(req)'
lineno 422
message u'TypeError: post_process_request() takes exactly 4 arguments (5 given)'
req <Request "GET u'/peerReviewMain'">
resp []
tb <traceback object at 0x90facd4>
tb_hide None
traceback 'Traceback (most recent call last):\n File ...
* File "/usr/lib/python2.5/site-packages/Trac-0.11-py2.5.egg/trac/web/main.py", line 202, in dispatch
Code fragment:
197. resp = chosen_handler.process_request(req)
198. if resp:
199. if len(resp) == 2: # Clearsilver
200. chrome.populate_hdf(req)
201. template, content_type = \
202. self._post_process_request(req, *resp)
203. # Give the session a chance to persist changes
204. if req.session:
205. req.session.save()
206. req.display(template, content_type or 'text/html')
207. else: # Genshi
Local variables:
Name Value
chosen_handler <codereview.peerReviewMain.UserbaseModule object at 0x91a95ac>
chrome <trac.web.chrome.Chrome object at 0x90631cc>
err (<type 'exceptions.TypeError'>, TypeError('post_process_request() takes ...
handler <codereview.peerReviewMain.UserbaseModule object at 0x91a95ac>
req <Request "GET u'/peerReviewMain'">
resp ('peerReviewMain.cs', None)
self <trac.web.main.RequestDispatcher object at 0x90633ac>
* File "/usr/lib/python2.5/site-packages/Trac-0.11-py2.5.egg/trac/web/main.py", line 299, in _post_process_request
Code fragment:
294. # Trac 0.10, only filters with same arity gets passed real values.
295. # Errors will call all filters with None arguments,
296. # and results will not be not saved.
297. extra_arg_count = arity(f.post_process_request) - 2
298. if extra_arg_count == nbargs:
299. resp = f.post_process_request(req, *resp)
300. elif nbargs == 0:
301. f.post_process_request(req, *(None,)*extra_arg_count)
302. return resp
303.
304.
Local variables:
Name Value
args ('peerReviewMain.cs', None)
extra_arg_count 2
f <trac.versioncontrol.api.RepositoryManager object at 0x91a980c>
nbargs 2
req <Request "GET u'/peerReviewMain'">
resp (<Request "GET u'/peerReviewMain'">, 'peerReviewMain.cs', None)
self <trac.web.main.RequestDispatcher object at 0x90633ac>
File "/usr/lib/python2.5/site-packages/Trac-0.11-py2.5.egg/trac/web/main.py", line 423, in _dispatch_request
dispatcher.dispatch(req)
File "/usr/lib/python2.5/site-packages/Trac-0.11-py2.5.egg/trac/web/main.py", line 202, in dispatch
self._post_process_request(req, *resp)
File "/usr/lib/python2.5/site-packages/Trac-0.11-py2.5.egg/trac/web/main.py", line 299, in _post_process_request
resp = f.post_process_request(req, *resp)
System Information:
User Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.17) Gecko/20080924 Ubuntu/8.04 (hardy) Firefox/2.0.0.17
Trac: 0.11
Python: 2.5.2 (r252:60911, Apr 21 2008, 11:29:43) [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)]
setuptools: 0.6c8
SQLite: 3.4.2
pysqlite: 2.3.2
Genshi: 0.5.1
mod_python: 3.3.1
Mercurial: 1.0.1
jQuery: 1.2.3
Attachments (0)
Change History (5)
comment:1 Changed 15 years ago by
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
comment:2 follow-up: 5 Changed 13 years ago by
| Resolution: | fixed |
|---|---|
| Status: | closed → reopened |
I got the same thing with the latest ZIP, then grabbed SVN trunk - but getting the 4/5 parameter nonsense again.
I'm on 0.11.7, python 2.7 on OS X, using tracd.
comment:3 Changed 13 years ago by
I can't reproduce. Can you post some details about your configuration and the conditions that lead to seeing the error?
comment:4 Changed 13 years ago by
| Resolution: | → fixed |
|---|---|
| Status: | reopened → closed |
Closing since there has been no follow-up.
comment:5 Changed 13 years ago by
Note: See
TracTickets for help on using
tickets.



Appears to be resolved on trunk. Please reopen if you continue to have issues.