Modify

Opened 14 years ago

Closed 12 years ago

Last modified 9 years ago

#8300 closed defect (fixed)

Static URL generates attribute error (on MySQL)

Reported by: Stefan Rungardt Owned by: Ryan J Ollos
Priority: high Component: TracTicketStatsPlugin
Severity: normal Keywords:
Cc: Peter Butkovic Trac Release: 0.11

Description (last modified by Ryan J Ollos)

How to Reproduce

While doing a GET operation on /ticketstats, Trac issued an internal error.

  1. I clicked on the Ticket Stats tab and waited until the graphs for 'All milestones' were displayed
  2. I changed the value of Milestone from 'All milestones' to a specific milestone and clicked 'Update chart' and waited until the graphs were displayed
  3. I copied the Static URL and pasted it to the address field of the browser and pressed Enter

Problem: I get an error message saying "AttributeError: 'list' object has no attribute 'find'"

Remark: The Static URL for 'All milestones' works fine.

Request parameters:

{'content': u'render',
 'end_date': u'12/13/2010',
 'milestone': u'Beauty and the Beast',
 'resolution': u'7',
 'start_date': u'11/01/2010'}

User Agent was: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_5; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.215 Safari/534.10

System Information

Trac 0.11.1
Python 2.5.2 (r252:60911, Jan 24 2010, 18:02:01)
[GCC 4.3.2]
setuptools 0.6c8
psycopg2 2.2.0
Genshi 0.5.1
mod_python 3.3.1
Pygments 0.10
Subversion 1.5.1 (r32289)
jQuery: 1.2.6

Python Traceback

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/trac/web/main.py", line 423, in _dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib/python2.5/site-packages/trac/web/main.py", line 197, in dispatch
    resp = chosen_handler.process_request(req)
  File "build/bdist.linux-x86_64/egg/ticketstats/ticketstats.py", line 232, in process_request
    milestone_num = milestone_list.find(milestone)
AttributeError: 'list' object has no attribute 'find'

Attachments (0)

Change History (8)

comment:1 Changed 14 years ago by Ryan J Ollos

Status: newassigned

Thanks for the report. Bumping the priority to remind myself to investigate by end of this coming weekend.

comment:2 Changed 14 years ago by Ryan J Ollos

Priority: normalhigh

comment:3 Changed 13 years ago by Ryan J Ollos

Status: assignednew

comment:4 Changed 12 years ago by Ryan J Ollos

Cc: Peter Butkovic added; anonymous removed

#11100 closed a duplicate. The reporter notes in that ticket that the issue only occurs when there is a space in the milestone, and therefore the url just needs to be properly encoded.

comment:5 Changed 12 years ago by Ryan J Ollos

Description: modified (diff)
Status: newassigned

comment:6 Changed 12 years ago by Ryan J Ollos

Resolution: fixed
Status: assignedclosed

(In [13190]) Fixes #8300: URI encode the static URL. Call index method of list to get index of item. Previously the non-existent find method was being called.

comment:7 Changed 12 years ago by Ryan J Ollos

The plugin still needs a lot of work, but at least this one issue should be fixed.

comment:8 Changed 9 years ago by Ryan J Ollos

#12310 closed as a duplicate.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.