Crash report: exceptions.UnboundLocalError

Leo Breebaart leo@lspace.org
Thu, 14 Mar 2002 18:07:04 +0100


Hi all,

We are using rdiff-backup 0.5.4 for single-machine local-disk-
to-other-local-disk backup purposes.

After suffering from the same infinite loop problem that was reported on
this list a couple of days ago, we applied Ben's patch and tried again,
only to be confronted by a run-time error, the trace for which I include
below.

Regards,

-- 
Leo Breebaart  <leo@lspace.org>

---------------------------------------------------------------------------

Warning, found unexpected inc file
+/backup/falcon.bak/rdiff-backup-data/increments/reeuwijk/timber/compiler/frontends/spar.2002-03-14T13:25:28+0
+2:00.dir
Exception local variable 'best_so_far' referenced before assignment raised of class
+exceptions.UnboundLocalError
  File "./rdiff-backup", line 4456, in patch_increment_and_finalize
    try: dsrp = cls.check_skip_error(error_checked)
  File "./rdiff-backup", line 4468, in check_skip_error
    try: return thunk()
  File "./rdiff-backup", line 4450, in error_checked
    ITR(indexed_tuple)
  File "./rdiff-backup", line 526, in __call__
    self.process_w_subreducer(indexed_elem)
  File "./rdiff-backup", line 480, in process_w_subreducer
    if not self.subreducer(indexed_elem):
  File "./rdiff-backup", line 526, in __call__
    self.process_w_subreducer(indexed_elem)
  File "./rdiff-backup", line 480, in process_w_subreducer
    if not self.subreducer(indexed_elem):
  File "./rdiff-backup", line 526, in __call__
    self.process_w_subreducer(indexed_elem)
  File "./rdiff-backup", line 480, in process_w_subreducer
    if not self.subreducer(indexed_elem):
  File "./rdiff-backup", line 526, in __call__
    self.process_w_subreducer(indexed_elem)
  File "./rdiff-backup", line 480, in process_w_subreducer
    if not self.subreducer(indexed_elem):
  File "./rdiff-backup", line 526, in __call__
    self.process_w_subreducer(indexed_elem)
  File "./rdiff-backup", line 480, in process_w_subreducer
    if not self.subreducer(indexed_elem):
  File "./rdiff-backup", line 523, in __call__
    self.calculate_final_val()
  File "./rdiff-backup", line 497, in calculate_final_val
    self.state.branch_val)
  File "./rdiff-backup", line 3828, in base_final
    inc_rpath.new_index(base_tuple.index))
  File "./rdiff-backup", line 3693, in Increment
    Inc.Increment_action(new, mirror, incpref).execute()
  File "./rdiff-backup", line 3687, in Increment_action
    elif mirror.isdir(): return Inc.makedir_action(mirror, incpref)
  File "./rdiff-backup", line 3714, in makedir_action
    dirsign = Inc.get_inc_ext(incpref, "dir")
  File "./rdiff-backup", line 3740, in get_inc_ext
    inctime = Resume.FindTime(rp.index, inctime)
  File "./rdiff-backup", line 3015, in FindTime
    if Time.prevtime <= later_than: return best_so_far

Traceback (most recent call last):
  File "./rdiff-backup", line 5092, in ?
    Globals.Main.Main()
  File "./rdiff-backup", line 4838, in Main
    self.take_action(rps)
  File "./rdiff-backup", line 4814, in take_action
    elif self.action == "backup": self.Backup(rps[0], rps[1])
  File "./rdiff-backup", line 4868, in Backup
    HighLevel.Mirror_and_increment(rpin, rpout, self.incdir, RSI)
  File "./rdiff-backup", line 4258, in Mirror_and_increment
    DestS.patch_increment_and_finalize(dest_rpath, diffiter, inc_rpath)
  File "./rdiff-backup", line 4461, in patch_increment_and_finalize
    except: cls.handle_last_error(last_dsrp, finalizer, ITR)
  File "./rdiff-backup", line 4456, in patch_increment_and_finalize
    try: dsrp = cls.check_skip_error(error_checked)
  File "./rdiff-backup", line 4468, in check_skip_error
    try: return thunk()
  File "./rdiff-backup", line 4450, in error_checked
    ITR(indexed_tuple)

  File "./rdiff-backup", line 526, in __call__
    self.process_w_subreducer(indexed_elem)
  File "./rdiff-backup", line 480, in process_w_subreducer
    if not self.subreducer(indexed_elem):
  File "./rdiff-backup", line 526, in __call__
    self.process_w_subreducer(indexed_elem)
  File "./rdiff-backup", line 480, in process_w_subreducer
    if not self.subreducer(indexed_elem):
  File "./rdiff-backup", line 526, in __call__
    self.process_w_subreducer(indexed_elem)
  File "./rdiff-backup", line 480, in process_w_subreducer
    if not self.subreducer(indexed_elem):
  File "./rdiff-backup", line 526, in __call__
    self.process_w_subreducer(indexed_elem)
  File "./rdiff-backup", line 480, in process_w_subreducer
    if not self.subreducer(indexed_elem):
  File "./rdiff-backup", line 526, in __call__
    self.process_w_subreducer(indexed_elem)
  File "./rdiff-backup", line 480, in process_w_subreducer
    if not self.subreducer(indexed_elem):
  File "./rdiff-backup", line 523, in __call__
    self.calculate_final_val()
  File "./rdiff-backup", line 497, in calculate_final_val
    self.state.branch_val)
  File "./rdiff-backup", line 3828, in base_final
    inc_rpath.new_index(base_tuple.index))
  File "./rdiff-backup", line 3693, in Increment
    Inc.Increment_action(new, mirror, incpref).execute()
  File "./rdiff-backup", line 3687, in Increment_action
    elif mirror.isdir(): return Inc.makedir_action(mirror, incpref)
  File "./rdiff-backup", line 3714, in makedir_action
    dirsign = Inc.get_inc_ext(incpref, "dir")
  File "./rdiff-backup", line 3740, in get_inc_ext
    inctime = Resume.FindTime(rp.index, inctime)
  File "./rdiff-backup", line 3015, in FindTime
    if Time.prevtime <= later_than: return best_so_far
UnboundLocalError: local variable 'best_so_far' referenced before assignment

---------------------------------------------------------------------------