Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#7996 closed defect (fixed)

csv export doesn't work

Reported by: anonymous Owned by: Ryan J Ollos
Priority: normal Component: TracHoursPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.12

Description (last modified by Ryan J Ollos)

When trying to export tickets using the CSV function, it returns:

AttributeError: 'list' object has no attribute 'keys'

How to Reproduce

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

(please provide additional details here)

Request parameters:

{'format': u'csv'}

User agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20100722 Firefox/3.6.8

System Information

System information not available

Enabled Plugins

Plugin information not available

Python Traceback

Traceback (most recent call last):
  File "build/bdist.linux-x86_64/egg/trac/web/", line 511, in _dispatch_request
  File "build/bdist.linux-x86_64/egg/trac/web/", line 237, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/lib/python2.5/site-packages/TracHoursPlugin-0.5.2-py2.5.egg/trachours/", line 234, in process_request
    return self.process_timeline(req)
  File "/usr/lib/python2.5/site-packages/TracHoursPlugin-0.5.2-py2.5.egg/trachours/", line 509, in process_timeline
    return self.display_html(req, query)
  File "/usr/lib/python2.5/site-packages/TracHoursPlugin-0.5.2-py2.5.egg/trachours/", line 834, in display_html
    self.queryhours2csv(req, data)
  File "/usr/lib/python2.5/site-packages/TracHoursPlugin-0.5.2-py2.5.egg/trachours/", line 986, in queryhours2csv
    for constraint in sorted(data['constraints'].keys()):
AttributeError: 'list' object has no attribute 'keys'

Attachments (0)

Change History (5)

comment:1 Changed 11 years ago by Ryan J Ollos

Description: modified (diff)
Owner: changed from ejucovy to Ryan J Ollos
Status: newassigned

Confirmed with Trac 0.12.2dev-r10331.

comment:2 Changed 11 years ago by Ryan J Ollos

See #6336 for a related issue with another plugin. In particular, the link in that thread to the Google Groups message is helpful.

comment:3 Changed 11 years ago by Ryan J Ollos

Resolution: fixed
Status: assignedclosed

(In [9618]) Fixed CSV export of data on the hours page by accounting for a change in the Trac API. In Trac 0.12, constraints is a list of dictionaries. Previously, it was just a dictionary. Fixes #7996.

The add filter function on the Hours page required a similar change. Refs #7642.

comment:4 Changed 11 years ago by Ryan J Ollos

(In [9619]) Removed some print statement that should have been removed before committing [9618]. Refs #7996.

comment:5 Changed 11 years ago by Ryan J Ollos

(In [9620]) Merged [9617:9619] from trunk to branches/0.12. Refs #7996.

Modify Ticket

Change Properties
Set your email in Preferences
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.