Bug 1639070

Summary: Backup fails with : UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 21: ordinal not in range(128)
Product: [Fedora] Fedora Reporter: trevor
Component: duplicityAssignee: Gwyn Ciesla <gwync>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 28CC: agrover, gwync, zaitcev
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: duplicity-0.7.18.2-1.fc27 duplicity-0.7.18.2-1.fc28 duplicity-0.7.18.2-1.fc29 duplicity-0.7.18.2-1.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-25 22:00:35 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
proposed patch none

Description trevor 2018-10-15 02:04:01 UTC
Description of problem:
Backup crashes with python decode error

Version-Release number of selected component (if applicable):
Name         : duplicity
Version      : 0.7.18.1
Release      : 1.fc28
Arch         : x86_64


How reproducible:
Always

Steps to Reproduce:
1. From overview select backup
2. Select backup now
3.

Actual results:
Backup crashes with traceback after some minutes

Expected results:
Backup works

Additional info:

Traceback:
Traceback (innermost last):
  File "/usr/bin/duplicity", line 1560, in <module>
    with_tempdir(main)
  File "/usr/bin/duplicity", line 1546, in with_tempdir
    fn()
  File "/usr/bin/duplicity", line 1398, in main
    do_backup(action)
  File "/usr/bin/duplicity", line 1419, in do_backup
    sync_archive()
  File "/usr/bin/duplicity", line 1209, in sync_archive
    copy_to_local(fn)
  File "/usr/bin/duplicity", line 1151, in copy_to_local
    fileobj = globals.backend.get_fileobj_read(fn)
  File "/usr/lib64/python2.7/site-packages/duplicity/backend.py", line 676, in get_fileobj_read
    self.get(filename, tdp)
  File "/usr/lib64/python2.7/site-packages/duplicity/backend.py", line 395, in inner_retry
    % (n, e.__class__.__name__, util.uexc(e)))
  File "/usr/lib64/python2.7/site-packages/duplicity/util.py", line 79, in uexc
    return ufn(unicode(e).encode('utf-8'))
 UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 21: ordinal not in range(128)

Comment 1 Pete Zaitcev 2018-10-15 15:18:35 UTC
Created attachment 1494072 [details]
proposed patch

This is a tricky area and I'm not surprised that duplicity developers
got it wrong. You'd think that unicode(e) just invokes __unicode__(),
but no, that would be too easy! The net result is, one must not use
unicode() in this situation.

The patch will lead to "if six.PY3:" eventually. There's no way to
code this in a portable way.

Comment 2 trevor 2018-10-16 02:29:28 UTC
I tested the patch and that solved this immediate problem, but the backups still fail with the problem that caused the retry in the first place. I will raise a separate but report for that problem.

Comment 3 Fedora Update System 2018-10-16 15:33:22 UTC
duplicity-0.7.18.1-2.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-484eb8c34f

Comment 4 Fedora Update System 2018-10-16 15:33:34 UTC
duplicity-0.7.18.1-2.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2018-a200131bf6

Comment 5 Fedora Update System 2018-10-16 15:33:40 UTC
duplicity-0.7.18.1-2.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-62c299cf25

Comment 6 Fedora Update System 2018-10-16 15:33:45 UTC
duplicity-0.7.18.1-2.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-0830b6623e

Comment 7 Fedora Update System 2018-10-17 16:05:38 UTC
duplicity-0.7.18.2-1.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-04d52197ea

Comment 8 Fedora Update System 2018-10-17 16:05:44 UTC
duplicity-0.7.18.2-1.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-d29ebd159f

Comment 9 Fedora Update System 2018-10-17 16:05:51 UTC
duplicity-0.7.18.2-1.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2018-9425436ad4

Comment 10 Fedora Update System 2018-10-17 16:05:57 UTC
duplicity-0.7.18.2-1.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-7b486d67f3

Comment 11 Fedora Update System 2018-10-17 23:31:50 UTC
duplicity-0.7.18.2-1.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-9425436ad4

Comment 12 Fedora Update System 2018-10-18 04:50:23 UTC
duplicity-0.7.18.2-1.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-04d52197ea

Comment 13 Fedora Update System 2018-10-18 04:57:04 UTC
duplicity-0.7.18.2-1.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-7b486d67f3

Comment 14 Fedora Update System 2018-10-18 05:16:53 UTC
duplicity-0.7.18.2-1.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-d29ebd159f

Comment 15 Fedora Update System 2018-10-25 22:00:35 UTC
duplicity-0.7.18.2-1.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.

Comment 16 Fedora Update System 2018-10-25 22:11:22 UTC
duplicity-0.7.18.2-1.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.

Comment 17 Fedora Update System 2018-10-30 17:29:25 UTC
duplicity-0.7.18.2-1.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.

Comment 18 Fedora Update System 2018-11-01 16:40:20 UTC
duplicity-0.7.18.2-1.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.