Modify

Opened 6 years ago

Last modified 4 years ago

#4476 new defect

TracHours causes internal error after migration from SQLite to PostgreSQL

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

Description (last modified by rjollos)

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.

Attachments (0)

Change History (6)

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

  • Severity changed from normal to critical

comment:4 in reply to: ↑ 3 Changed 5 years ago by k0s

  • Severity changed from critical to normal

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 4 years ago by rjollos

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

comment:6 Changed 4 years ago by rjollos

  • Owner changed from k0s to rjollos

Reassigning ticket to new maintainer.

Add Comment

Modify Ticket

Action
as new The owner will remain rjollos.
Author


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

 
Note: See TracTickets for help on using tickets.