Opened 4 years ago

Closed 21 months ago

Last modified 21 months ago

#8300 closed defect (fixed)

Static URL generates attribute error (on MySQL)

Reported by: sterun Owned by: rjollos
Priority: high Component: TracTicketStatsPlugin
Severity: normal Keywords:
Cc: typek_pb Trac Release: 0.11

Description (last modified by rjollos)

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/", line 423, in _dispatch_request
  File "/usr/lib/python2.5/site-packages/trac/web/", line 197, in dispatch
    resp = chosen_handler.process_request(req)
  File "build/bdist.linux-x86_64/egg/ticketstats/", line 232, in process_request
    milestone_num = milestone_list.find(milestone)
AttributeError: 'list' object has no attribute 'find'

Attachments (0)

Change History (7)

comment:1 Changed 4 years ago by rjollos

  • Status changed from new to assigned

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

comment:2 Changed 4 years ago by rjollos

  • Priority changed from normal to high

comment:3 Changed 3 years ago by rjollos

  • Status changed from assigned to new

comment:4 Changed 21 months ago by rjollos

  • Cc typek_pb 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 21 months ago by rjollos

  • Description modified (diff)
  • Status changed from new to assigned

comment:6 Changed 21 months ago by rjollos

  • Resolution set to fixed
  • Status changed from assigned to closed

(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 21 months ago by rjollos

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

Add Comment

Modify Ticket

as closed The owner will remain rjollos.
The resolution will be deleted. Next status will be 'reopened'.

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

Note: See TracTickets for help on using tickets.