Ticket #706 (closed defect: fixed)
Opened 8 years ago
Last modified 8 years ago
Query module doesn't work from cgi.
| Reported by: | prefiks@… | Owned by: | cmlenz |
|---|---|---|---|
| Priority: | normal | Milestone: | 0.8 |
| Component: | ticket system | Version: | devel |
| Severity: | major | Keywords: | |
| Cc: | |||
| Release Notes: | |||
| API Changes: | |||
Description
When i try to use to get trac.cgi/query?status=new&status=assigned&status=reopened&milestone=M1 i'v got this error:
iteration over non-sequence
Traceback (most recent call last):
File "/usr/lib/python2.3/site-packages/trac/core.py", line 514, in cgi_start
real_cgi_start()
File "/usr/lib/python2.3/site-packages/trac/core.py", line 509, in real_cgi_start
dispatch_request(path_info, args, req, env)
File "/usr/lib/python2.3/site-packages/trac/core.py", line 424, in dispatch_request
module.run()
File "/usr/lib/python2.3/site-packages/trac/Module.py", line 45, in run
self.render()
File "/usr/lib/python2.3/site-packages/trac/Ticket.py", line 482, in render
self.env.href.query(constraints_dict, order, not desc))
File "/usr/lib/python2.3/site-packages/trac/Href.py", line 79, in query
params.append(field + '=' + urllib.quote(value))
File "/usr/lib/python2.3/urllib.py", line 1153, in quote
return _fast_quote(s)
File "/usr/lib/python2.3/urllib.py", line 1123, in _fast_quote
res = list(s)
TypeError: iteration over non-sequence
This works fine with mod_python.
Attachments
Change History
Changed 8 years ago by prefiks@…
comment:1 Changed 8 years ago by prefiks@…
- Component changed from report system to ticket system
- Version changed from 0.7.1 to devel
comment:2 Changed 8 years ago by cmlenz
- Milestone set to 0.8
- Owner changed from daniel to cmlenz
comment:3 Changed 8 years ago by cmlenz
- Status changed from new to assigned
comment:4 Changed 8 years ago by Christopher Lenz <cmlenz@…>
As far as I can tell, the branching in the patch isn't really necessary. vals[j].value or vals.value work okay on mod_python, too.
comment:5 Changed 8 years ago by cmlenz
- Resolution set to fixed
- Status changed from assigned to closed
Fixed in [855].
(I hope. Incorporated a modified version of the patch that still works in mod_python, as per the previous comment.)
comment:6 Changed 8 years ago by prefiks
[855] doesn't solve this.
Assigning vals = vals.value is essential, vals is also used later in code.
comment:7 Changed 8 years ago by anonymous
- Resolution fixed deleted
- Status changed from closed to reopened
comment:8 Changed 8 years ago by cmlenz
- Resolution set to fixed
- Status changed from reopened to closed
Oops, sorry about that oversight. I've checked in the second patch in [856], hope that fixes the issue.



This patch solve this issue.