Modify

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#13565 closed defect (fixed)

Roadmap: IndexError: list index out of range

Reported by: Massimo Owned by: EmeCas
Priority: normal Component: TracHoursPlugin
Severity: normal Keywords:
Cc: Trac Release: 1.2

Description

Hi,

we migrated to latest stable Trac 1.2.3 and last svn trunc version TracHours-0.7.3.dev0-py2.7.egg. We also have all depencencies required.

Adding hours to tickets works, but /roadmap now fails with:

IndexError: list index out of range

File "/usr/lib64/python2.7/site-packages/trac/web/main.py", line 647, in _dispatch_request
  dispatcher.dispatch(req)
File "/usr/lib64/python2.7/site-packages/trac/web/main.py", line 268, in dispatch
  iterable=chrome.use_chunked_encoding)
File "/usr/lib64/python2.7/site-packages/trac/web/chrome.py", line 1170, in render_template
  encoding='utf-8')
File "/usr/lib64/python2.7/site-packages/genshi/core.py", line 184, in render
  return encode(generator, method=method, encoding=encoding, out=out)
File "/usr/lib64/python2.7/site-packages/genshi/output.py", line 58, in encode
  for chunk in iterator:
File "/usr/lib64/python2.7/site-packages/genshi/output.py", line 350, in __call__
  for kind, data, pos in stream:
File "/usr/lib64/python2.7/site-packages/genshi/output.py", line 829, in __call__
  for kind, data, pos in stream:
File "/usr/lib64/python2.7/site-packages/genshi/output.py", line 669, in __call__
  for kind, data, pos in stream:
File "/usr/lib64/python2.7/site-packages/genshi/output.py", line 774, in __call__
  for kind, data, pos in chain(stream, [(None, None, None)]):
File "/usr/lib64/python2.7/site-packages/genshi/output.py", line 594, in __call__
  for ev in stream:
File "/usr/lib64/python2.7/site-packages/genshi/core.py", line 289, in _ensure
  for event in stream:
File "/usr/lib64/python2.7/site-packages/genshi/core.py", line 289, in _ensure
  for event in stream:
File "/usr/lib64/python2.7/site-packages/trac/web/chrome.py", line 1437, in _strip_accesskeys
  for kind, data, pos in stream:
File "/usr/lib64/python2.7/site-packages/genshi/core.py", line 289, in _ensure
  for event in stream:
File "/usr/lib64/python2.7/site-packages/trac/web/chrome.py", line 1426, in _generate
  for kind, data, pos in stream:
File "/usr/lib64/python2.7/site-packages/genshi/core.py", line 289, in _ensure
  for event in stream:
File "/usr/lib64/python2.7/site-packages/genshi/core.py", line 289, in _ensure
  for event in stream:
File "/usr/lib64/python2.7/site-packages/genshi/filters/transform.py", line 706, in _unmark
  for mark, event in stream:
File "/usr/lib64/python2.7/site-packages/genshi/filters/transform.py", line 1172, in __call__
  for subevent in self._inject():
File "/usr/lib64/python2.7/site-packages/genshi/filters/transform.py", line 1063, in _inject
  for event in _ensure(content):
File "/usr/lib64/python2.7/site-packages/genshi/core.py", line 272, in _ensure
  stream = iter(stream)
File "build/bdist.linux-x86_64/egg/trachours/web_ui.py", line 124, in __iter__
  milestone = self.buffer.events[3][1]

Attachments (0)

Change History (11)

comment:1 Changed 5 years ago by EmeCas

Unfortunately, I could not reproduce your issue with the provide information, I'm wonder what Trac version you had upgraded from.

comment:2 Changed 5 years ago by Massimo

We just migrated from 1.2 to 1.2.3. Then we migrated also postgres 9.3 to 11. However we did not use TracHours before. So I can't say if the issue is new. Here is the list of active plugins:

ComponentDependencyPlugin-0.1-py2.7.egg
FieldTooltip-0.7.3-py2.7.egg
IncludeSource-0.4-py2.7.egg
SimpleMultiProject-0.6.0.dev0-py2.7.egg
ticketsboardplugin-1.2.3.dev0-py2.7.egg
TicketSidebarProvider-0.0-py2.7.egg
TracAccountManager-0.5.1.dev0-py2.7.egg
TracAutocompleteUsersPlugin-0.4.6.dev0-py2.7.egg
TracCodeReviewer-1.0.0.dev0-py2.7.egg
TracDiscussion-1.2.dev0-py2.7.egg
TracDynamicFields-2.3.0.dev0-py2.7.egg
TracEstimationTools-0.5.0.dev0-py2.7.egg
TracFullBlogPlugin-0.1.6.3-py2.7.egg
TracHours-0.7.3.dev0-py2.7.egg
TracHtmlNotificationPlugin-0.12.0.1-py2.7.egg
TracIncludeMacro-3.2.0.dev0-py2.7.egg
Trac_jsGantt-1.2.0.0.dev0-py2.7.egg
trac_NewTicketLikeThisPlugin-0.2-py2.7.egg
TracQuiet-1.2.1.dev0-py2.7.egg
TracSQLHelper-0.3.1-py2.7.egg
TracSubTicketsPlugin-0.5.4.dev0-py2.7.egg
TracTicketFieldsLayoutPlugin-0.12.0.5-py2.7.egg
TracWikiExtras-1.3.1.dev0-py2.7.egg
TracWorkflowAdmin-0.12.0.5-py2.7.egg
TracXMLRPC-1.1.8.dev0-py2.7.egg
WikiAutoComplete-1.4.dev0-py2.7.egg
XMailPlugin-0.4.3-py2.7.egg

Disabling the component TracHoursRoadmapFilter makes the Roadmap work again.

comment:3 Changed 5 years ago by EmeCas

is there a chance you have a milestone with corrupted/incomplete information in your database, something like the milestone name set to NULL?

comment:4 Changed 5 years ago by EmeCas

Status: newaccepted

comment:5 Changed 5 years ago by Massimo

Right, there was a Milestone that was valid named but had no single ticket belonging to that milestone. After deleting that Milestone the /roadmap is working. As this is a common situation please adapt the plugin accordingly.

comment:6 Changed 5 years ago by EmeCas

Milestones that don't have tickets work for me perfectly at the roadmap. May you create a new milestone and try again?

Last edited 5 years ago by EmeCas (previous) (diff)

comment:7 Changed 5 years ago by Ryan J Ollos

It can be challenging to find the source of the problem on a system with so many plugins installed. SimpleMultiProjectPlugin is where I would look first.

comment:8 Changed 5 years ago by EmeCas

Resolution: fixed
Status: acceptedclosed

In 17383:

TracHours 0.7.4dev: Add validations

Fixes #13565.

comment:9 Changed 5 years ago by Ryan J Ollos

r17383:

  • import logging is not needed
  • self.buffer.events.__len__() -> len(self.buffer.events)
  • self.buffer.events[3].__len__() -> len(self.buffer.events[3])

comment:10 in reply to:  9 Changed 5 years ago by EmeCas

Thanks

Replying to Ryan J Ollos:

r17383:

  • import logging is not needed
  • self.buffer.events.__len__() -> len(self.buffer.events)
  • self.buffer.events[3].__len__() -> len(self.buffer.events[3])

comment:11 Changed 5 years ago by Ryan J Ollos

Thank you for applying the changes in r17388.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain EmeCas.
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.