backup and also restore failed (lp:#1823201)

[Original report](https://bugs.launchpad.net/bugs/1823201) created by **Erik Uitterdijk (heidehipper)**
```
Backup fails lately on OpenSuse Leap laptop, openSUSE Leap 15.0 with
duplicity-0.7.17-lp150.1.1.x86_64

Hi, lately I have an issue with the application. I get the following error
message and the backup fails:

Traceback (innermost last): File "/usr/bin/duplicity", line 1555, in
with_tempdir(main) File "/usr/bin/duplicity", line 1541, in with_tempdir
fn() File "/usr/bin/duplicity", line 1393, in main do_backup(action) File
"/usr/bin/duplicity", line 1472, in do_backup restore(col_stats) File
"/usr/bin/duplicity", line 728, in restore
restore_get_patched_rop_iter(col_stats)): File "/usr/lib64/python2.7/site-
packages/duplicity/patchdir.py", line 558, in Write_ROPaths for ropath in
rop_iter: File "/usr/lib64/python2.7/site-packages/duplicity/patchdir.py",
line 521, in integrate_patch_iters for patch_seq in collated: File
"/usr/lib64/python2.7/site-packages/duplicity/patchdir.py", line 389, in
yield_tuples setrorps(overflow, elems) File "/usr/lib64/python2.7/site-
packages/duplicity/patchdir.py", line 378, in setrorps elems[i] =
iter_list[i].next() File "/usr/lib64/python2.7/site-
packages/duplicity/patchdir.py", line 107, in filter_path_iter for path in
path_iter: File "/usr/lib64/python2.7/site-packages/duplicity/patchdir.py",
line 121, in difftar2path_iter tarinfo_list = [tar_iter.next()] File
"/usr/lib64/python2.7/site-packages/duplicity/patchdir.py", line 339, in
next self.set_tarfile() File "/usr/lib64/python2.7/site-
packages/duplicity/patchdir.py", line 333, in set_tarfile self.current_fp =
self.fileobj_iter.next() File "/usr/bin/duplicity", line 764, in
get_fileobj_iter backup_set.volume_name_dict[vol_num], KeyError: 1


Also the restore of a file failed with the following error message, "Failed
with an unknown error":

Traceback (innermost last):
  File "/usr/bin/duplicity", line 1555, in <module>
    with_tempdir(main)
  File "/usr/bin/duplicity", line 1541, in with_tempdir
    fn()
  File "/usr/bin/duplicity", line 1393, in main
    do_backup(action)
  File "/usr/bin/duplicity", line 1472, in do_backup
    restore(col_stats)
  File "/usr/bin/duplicity", line 728, in restore
    restore_get_patched_rop_iter(col_stats)):
  File "/usr/lib64/python2.7/site-packages/duplicity/patchdir.py", line
558, in Write_ROPaths
    for ropath in rop_iter:
  File "/usr/lib64/python2.7/site-packages/duplicity/patchdir.py", line
521, in integrate_patch_iters
    for patch_seq in collated:
  File "/usr/lib64/python2.7/site-packages/duplicity/patchdir.py", line
389, in yield_tuples
    setrorps(overflow, elems)
  File "/usr/lib64/python2.7/site-packages/duplicity/patchdir.py", line
378, in setrorps
    elems[i] = iter_list[i].next()
  File "/usr/lib64/python2.7/site-packages/duplicity/patchdir.py", line
107, in filter_path_iter
    for path in path_iter:
  File "/usr/lib64/python2.7/site-packages/duplicity/patchdir.py", line
121, in difftar2path_iter
    tarinfo_list = [tar_iter.next()]
  File "/usr/lib64/python2.7/site-packages/duplicity/patchdir.py", line
339, in next
    self.set_tarfile()
  File "/usr/lib64/python2.7/site-packages/duplicity/patchdir.py", line
333, in set_tarfile
    self.current_fp = self.fileobj_iter.next()
  File "/usr/bin/duplicity", line 764, in get_fileobj_iter
    backup_set.volume_name_dict[vol_num],
 KeyError: 5

Any help / suggestions appreciated.

Regards,

Erik

the Netherlands
```

Story points: 8.0