Edgewall Software
Modify

Opened 20 years ago

Closed 20 years ago

#706 closed defect (fixed)

Query module doesn't work from cgi.

Reported by: prefiks@… 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)

trac.diff (850 bytes ) - added by prefiks@… 20 years ago.
This patch solve this issue.
trac2.diff (858 bytes ) - added by prefiks 20 years ago.
Updated patch

Download all attachments as: .zip

Change History (10)

by prefiks@…, 20 years ago

Attachment: trac.diff added

This patch solve this issue.

comment:1 by prefiks@…, 20 years ago

Component: report systemticket system
Version: 0.7.1devel

comment:2 by Christopher Lenz, 20 years ago

Milestone: 0.8
Owner: changed from daniel to Christopher Lenz

comment:3 by Christopher Lenz, 20 years ago

Status: newassigned

comment:4 by Christopher Lenz <cmlenz@…>, 20 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 Christopher Lenz, 20 years ago

Resolution: fixed
Status: assignedclosed

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 prefiks, 20 years ago

[855] doesn't solve this.

Assigning vals = vals.value is essential, vals is also used later in code.

comment:7 by anonymous, 20 years ago

Resolution: fixed
Status: closedreopened

by prefiks, 20 years ago

Attachment: trac2.diff added

Updated patch

comment:8 by Christopher Lenz, 20 years ago

Resolution: fixed
Status: reopenedclosed

Oops, sorry about that oversight. I've checked in the second patch in [856], hope that fixes the issue.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christopher Lenz.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christopher Lenz to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.