Opened 9 years ago

Last modified 18 months ago

#4476 new defect

TracHours causes internal error after migration from SQLite to PostgreSQL

Reported by: chuntley@… Owned by:
Priority: normal Component: TracHoursPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description (last modified by Ryan J Ollos)

When I enable TracHours on a Trac that I migrated from sqlite to postgresql, I get and IndexError: list index out of range error every time I try to view a ticket.

The traceback is

File "/usr/lib/python2.4/site-packages/trac/web/", line 423, in _dispatch_request
File "/usr/lib/python2.4/site-packages/trac/web/", line 219, in dispatch
  data, content_type)
File "/usr/lib/python2.4/site-packages/trac/web/", line 690, in render_template
  stream |= self._filter_stream(req, method, filename, stream, data)
File "/usr/lib64/python2.4/site-packages/genshi/", line 128, in __or__
  return Stream(_ensure(function(self)), serializer=self.serializer)
File "/usr/lib/python2.4/site-packages/trac/web/", line 777, in inner
File "/usr/lib/python2.4/site-packages/TracHoursPlugin-0.2.-py2.4.egg/trachours/", line 244, in filter_stream
  stream = handler(req, stream, data)
File "/usr/lib/python2.4/site-packages/TracHoursPlugin-0.2.-py2.4.egg/trachours/", line 1017, in filter_ticket
  totalhours = [ field for field in data['fields'] if field['name'] == 'totalhours' ][0]

From reading elsewhere, it appears that this might have something to do with sequences in Postgresql not being updated properly in the migration. However, I thought I'd report it here because others seems might be having the same problem.

Attachments (0)

Change History (7)

comment:1 Changed 9 years ago by alejoverdin@…

Same problema but with the following environment:

Trac:  	        0.11
Python: 	2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)]
setuptools: 	0.6c9
SQLite: 	3.3.4
pysqlite: 	2.3.2
Genshi: 	0.5.1
mod_python: 	3.3.1
Subversion: 	1.5.1 (r32289)
jQuery:	        1.2.3

comment:2 Changed 8 years ago by anonymous

Same problem here with no postgres at all:

Trac: 	        0.11.5
Python: 	2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit (Intel)]
setuptools: 	0.6c9
SQLite: 	3.6.11
pysqlite: 	2.5.5
Genshi: 	0.5.1
Subversion: 	1.5.6 (r36142)
RPC: 	        1.0.6
jQuery:	        1.2.6

comment:3 Changed 8 years ago by anonymous

Severity: normalcritical

comment:4 in reply to:  3 Changed 8 years ago by Jeff Hammel

Severity: criticalnormal

Please don't change priority or severity on tickets unless you have time to contribute. I don't have time to work on this right now and I use priority and severity as guides in those few moments when I do have time to debug my Trac plugins.

comment:5 Changed 7 years ago by Ryan J Ollos

Description: modified (diff)
Summary: TracHours causes internal error afterTracHours causes internal error after migration from SQLite to PostgreSQL

comment:6 Changed 7 years ago by Ryan J Ollos

Owner: changed from Jeff Hammel to Ryan J Ollos

Reassigning ticket to new maintainer.

comment:7 Changed 18 months ago by Ryan J Ollos

Owner: Ryan J Ollos deleted

Modify Ticket

Change Properties
Set your email in Preferences
as new The ticket will remain with no owner.

Add Comment

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

Note: See TracTickets for help on using tickets.