Opened 15 years ago

Last modified 6 years ago

#4476 assigned defect

TracHours causes internal error after migration from SQLite to PostgreSQL — at Version 5

Reported by: chuntley@… Owned by: Jeff Hammel
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/main.py", line 423, in _dispatch_request
  dispatcher.dispatch(req)
File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 219, in dispatch
  data, content_type)
File "/usr/lib/python2.4/site-packages/trac/web/chrome.py", line 690, in render_template
  stream |= self._filter_stream(req, method, filename, stream, data)
File "/usr/lib64/python2.4/site-packages/genshi/core.py", line 128, in __or__
  return Stream(_ensure(function(self)), serializer=self.serializer)
File "/usr/lib/python2.4/site-packages/trac/web/chrome.py", line 777, in inner
  data)
File "/usr/lib/python2.4/site-packages/TracHoursPlugin-0.2.-py2.4.egg/trachours/hours.py", line 244, in filter_stream
  stream = handler(req, stream, data)
File "/usr/lib/python2.4/site-packages/TracHoursPlugin-0.2.-py2.4.egg/trachours/hours.py", 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.

Change History (5)

comment:1 Changed 15 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 15 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 15 years ago by anonymous

Severity: normalcritical

comment:4 in reply to:  3 Changed 15 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 13 years ago by Ryan J Ollos

Description: modified (diff)
Summary: TracHours causes internal error afterTracHours causes internal error after migration from SQLite to PostgreSQL
Note: See TracTickets for help on using tickets.