Score:0

Deja Dup UnicodeDecodeError when attempting a restore from a live session onto a clean install

io flag

I'm trying to restore my system to before a borked upgrade. There is a fresh install of 18.04 Desktop on the drive now, and I'm trying to restore my settings and such using Deja Dup from a live session.

After a short while of it seemingly being stuck in Preparing... it gave this 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 1476, in do_backup
    list_current(col_stats)
  File "/usr/bin/duplicity", line 704, in list_current
    for path in path_iter:
  File "/usr/lib/python2.7/dist-packages/duplicity/diffdir.py", line 354, in combine_path_iters
    refresh_triple_list(triple_list)
  File "/usr/lib/python2.7/dist-packages/duplicity/diffdir.py", line 341, in refresh_triple_list
    new_triple = get_triple(old_triple[1])
  File "/usr/lib/python2.7/dist-packages/duplicity/diffdir.py", line 327, in get_triple
    path = path_iter_list[iter_index].next()
  File "/usr/lib/python2.7/dist-packages/duplicity/diffdir.py", line 239, in sigtar2path_iter
    for tarinfo in tf:
  File "/usr/lib/python2.7/tarfile.py", line 2512, in next
    tarinfo = self.tarfile.next()
  File "/usr/lib/python2.7/tarfile.py", line 2360, in next
    tarinfo = self.tarinfo.fromtarfile(self)
  File "/usr/lib/python2.7/tarfile.py", line 1254, in fromtarfile
    return obj._proc_member(tarfile)
  File "/usr/lib/python2.7/tarfile.py", line 1276, in _proc_member
    return self._proc_pax(tarfile)
  File "/usr/lib/python2.7/tarfile.py", line 1408, in _proc_pax
    value = value.decode("utf8")
  File "/usr/lib/python2.7/encodings/utf_8.py", line 16, in decode
    return codecs.utf_8_decode(input, errors, True)
 UnicodeDecodeError: 'utf8' codec can't decode byte 0xe0 in position 21: unexpected end of data

What happened, and what can I do to fix it?

*I just tried using an older restore point, but got the same error. Next I will try to use the "ignore errors" command I seen on another post but lost the bookmark. Will update once I find it again.

**This post tells of a command --ignore-errors that's used in the command line. Now to figure out how to use Deja Dup via the terminal.

***This post shows the same error I'm having now after I learned the command lines for duplicity, and it's from 2017... The issue has to do with Python 2.7. It throws an error when it attempts to decode utf8 to ASCII. There was only one workaround that was renaming files.

I'm working with Duplicity version 0.7.17, and apparently this was fixed after 0.7.12.

Currently trying the command LC_ALL=C found in the second link, which apparently does a thing. We'll see what it is soon I hope.

Is there any way to completely exclude python files from being restored? [There is not.]

****I am now using the most up to date version of duplicity (0.8.20), the version that comes packed with Ubuntu was of course out of date... Still getting the error though.

I now think the error is because of a single file in my backup that uses an empty character as it's name. The file is in my desktop, so maybe I can exclude everything in my desktop folder? Or perhaps exclude Python 2.7 itself? Though that might introduce other errors...

*****list-current-files gives exactly the same error.

Organic Marble avatar
us flag
Are you using the snap version of Deja-Dup? Are you using Deja-Dup as root?
J.Tho avatar
io flag
@Organic Marble Fairly certain it's the snap version. I'm using the Deja Dup that comes with Ubuntu, not sure how I can be certain if I'm using at as root or not?
J.Tho avatar
io flag
@OrganicMarble Now that I have a bit more time, I found that the snap version of Deja Dup uses an outdated version of duplicity. I've installed the newest version of duplicity (0.8.20), but the problem persists (not using the GUI). Is it possible to exclude restoring all of Python2.7 or < Python3.xx?
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.