Tickets

Issues

StopIteration exception

  • Id: dulwich
  • Status: Open
  • Initial commit: 74cf8900d9cef8358f4967b9854743fee8701d39
  • Creation date: 2012-05-01 21:55:15
  • Last changed: 2023-01-18 12:16:41
  • Created by: Laurent Defert
  • File:
  • Last changed by: Laurent DEFERT
  • Tag:

Sometimes, Dulwich exits with a StopIteration exception. Running git gc usually fix the problem.

$ ./staticpm.sh -c staticpm.cfg
Building child tree
Traceback (most recent call last):
  File "./staticpm/staticpm", line 51, in <module>
    repo = Git(conf.get('repository', 'path'))
  File "/home/lds/dev/staticpm/staticpm/git.py", line 105, in __init__
    walker = self.repo.get_graph_walker()
  File "/usr/lib/python2.6/site-packages/dulwich/repo.py", line 847, in get_graph_walker
    heads = self.refs.as_dict('refs/heads').values()
  File "/usr/lib/python2.6/site-packages/dulwich/repo.py", line 191, in as_dict
    keys = self.keys(base)
  File "/usr/lib/python2.6/site-packages/dulwich/repo.py", line 168, in keys
    return self.subkeys(base)
  File "/usr/lib/python2.6/site-packages/dulwich/repo.py", line 413, in subkeys
    for key in self.get_packed_refs():
  File "/usr/lib/python2.6/site-packages/dulwich/repo.py", line 462, in get_packed_refs
    first_line = iter(f).next().rstrip()
StopIteration
$

History
    Changed by Laurent DEFERT on 2023-01-18 12:16:41 during fbea579dac61d4988aca4bf9bd4c0578003a2385
  • Content: updated from

    Sometimes, Dulwich exits with a StopIteration exception. Running git gc usually fix the problem.

    $ ./kissspm.sh -c kissspm.cfg
    Building child tree
    Traceback (most recent call last):
      File "./kissspm/kissspm", line 51, in <module>
        repo = Git(conf.get('repository', 'path'))
      File "/home/lds/dev/kissspm/kissspm/git.py", line 105, in __init__
        walker = self.repo.get_graph_walker()
      File "/usr/lib/python2.6/site-packages/dulwich/repo.py", line 847, in get_graph_walker
        heads = self.refs.as_dict('refs/heads').values()
      File "/usr/lib/python2.6/site-packages/dulwich/repo.py", line 191, in as_dict
        keys = self.keys(base)
      File "/usr/lib/python2.6/site-packages/dulwich/repo.py", line 168, in keys
        return self.subkeys(base)
      File "/usr/lib/python2.6/site-packages/dulwich/repo.py", line 413, in subkeys
        for key in self.get_packed_refs():
      File "/usr/lib/python2.6/site-packages/dulwich/repo.py", line 462, in get_packed_refs
        first_line = iter(f).next().rstrip()
    StopIteration
    $