Opened 14 years ago

Closed 9 years ago

#4471 closed defect (duplicate)

StopIteration error with some repositories

Reported by: anonymous Owned by: Emmanuel Blot
Priority: normal Component: RevtreePlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11


We run a number of trac projects and have installed this plugin so that it can be used in any of them. In one of the projects it seems to work fine, but in another project I always get the following error messages:

Trac detected an internal error:


Python Traceback Most recent call last:

  • File "/usr/lib/python2.4/site-packages/Trac-", line 432, in _dispatch_request
  • File "/usr/lib/python2.4/site-packages/Trac-", line 204, in dispatch
  • File "build/bdist.linux-x86_64/egg/revtree/", line 246, in process_request
  • File "build/bdist.linux-x86_64/egg/revtree/", line 356, in _process_revtree
  • File "build/bdist.linux-x86_64/egg/revtree/", line 446, in build
  • File "build/bdist.linux-x86_64/egg/revtree/", line 51, in get_chgset_info

Regards, Dan

Attachments (0)

Change History (8)

comment:1 Changed 14 years ago by Emmanuel Blot

Would you have a log of the related changesets to help understanding the issue?

comment:2 Changed 14 years ago by anonymous

Well, the repository is for a commercial software product and so I cannot just post changeset data here in the public domain.

Perhaps you could give me some information such that I could locate what might be the cause myself. For a start I do not know how far back the plugin is looking (it would be the default setting I guess since it has been displaying this error ever since enabling it). Is it likely to be something in the commit logs themselves that is causing the problem?

comment:3 Changed 14 years ago by anonymous

Ok, I've made some progress. I checked out the plugin myself and modified it slightly. It seems that the plugin was getting itself mixed up for that particular repository on its initial attempt to render the graph, once I could get it past that first failed attempt it seemed to work normally. The method I used to get it past that first failure was as follows:

In the file "", function "get_chgset_info" (around line 51) there is a call to "", but if "chgit" happens to be empty the call will throw an exception which is not caught by the plugin. By adding a try/except around the call and if it throws the StopIteration exception then simply return an empty "info" array, it allows the plugin to continue functioning normally.


    def get_chgset_info(tracchgset):
        info = {}
        chgit = tracchgset.get_changes()
            item =
        except StopIteration:
            return info

        except StopIteration:
            info['unique'] = True
            # more changes are available, i.e. this is not a simple changeset
            info['unique'] = False
        enum = ('path', 'kind', 'change', 'base_path', 'base_rev')
        for (pos, name) in enumerate(enum):
            info[name] = item[pos]
        return info

Hope this helps!

Regards, Dan

comment:4 Changed 14 years ago by Martin Scharrer

Hi think this error occurs if an empty revision (produced by filtering a dumpfile) is rendered. See ticket #4763.

comment:5 Changed 14 years ago by toddecus

This code change resolved our issue as well.

comment:6 Changed 14 years ago by Javier Sanz

I'm also having this problem, but I'm reluctant to patch my plugin. If the fix proposed by Dan really fixes the issue I'd love to see it included in the distribution.

comment:7 Changed 14 years ago by Kaveh

I'm getting this error with the latest version 0.6.3.xx on Trac 0.11.5 on a changeset where a user deleted files, but trac indicates that there are no changes. Any fix for this?

comment:8 Changed 9 years ago by Emmanuel Blot

Resolution: duplicate
Status: newclosed

Duplicated/tracked as #9231

Modify Ticket

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