Opened 21 years ago
Closed 21 years ago
#706 closed defect (fixed)
Query module doesn't work from cgi.
| Reported by: | Owned by: | Christopher Lenz | |
|---|---|---|---|
| Priority: | normal | Milestone: | 0.8 |
| Component: | ticket system | Version: | devel |
| Severity: | major | Keywords: | |
| Cc: | Branch: | ||
| Release Notes: | |||
| API Changes: | |||
| Internal 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 (2)
Change History (10)
by , 21 years ago
comment:1 by , 21 years ago
| Component: | report system → ticket system |
|---|---|
| Version: | 0.7.1 → devel |
comment:2 by , 21 years ago
| Milestone: | → 0.8 |
|---|---|
| Owner: | changed from to |
comment:3 by , 21 years ago
| Status: | new → assigned |
|---|
comment:4 by , 21 years ago
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 by , 21 years ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → 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 by , 21 years ago
[855] doesn't solve this.
Assigning vals = vals.value is essential, vals is also used later in code.
comment:7 by , 21 years ago
| Resolution: | fixed |
|---|---|
| Status: | closed → reopened |
comment:8 by , 21 years ago
| Resolution: | → fixed |
|---|---|
| Status: | reopened → 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.