Backup to S3 not possible due to Python3 decoding error

Bug #1834373 reported by Manuel J.
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Duplicity
Fix Released
Medium
Unassigned
Déjà Dup
Fix Released
Undecided
Unassigned

Bug Description

*Setup*

Deja-Dup 40.1 (Snap revision 182)
Duplicity 0.8.00
Ubuntu 18.04

*How to reproduce*

Attempt a (encrypted) backup via `deja-dup --backup` to S3. Observe the following output:

*Actual output* (by specifying DEJA_DUP_DEBUG=1)

On GUI: "Giving up after 5 attempts. TypeError: must be str, not bytes"

DEBUG output:
---
Backtrace of previous error: Traceback (innermost last):
DUPLICITY: . File "/snap/deja-dup/182/lib/python3.6/site-packages/duplicity/backend.py", line 374, in inner_retry
DUPLICITY: . return fn(self, *args)
DUPLICITY: . File "/snap/deja-dup/182/lib/python3.6/site-packages/duplicity/backend.py", line 557, in get
DUPLICITY: . self.backend._get(remote_filename, local_path)
DUPLICITY: . File "/snap/deja-dup/182/lib/python3.6/site-packages/duplicity/backends/_boto_single.py", line 271, in _get
DUPLICITY: . key_name = self.key_prefix + remote_filename
DUPLICITY: . TypeError: must be str, not bytes
---

*Expected behaviour*

Seamless backup to S3.

*Suggested fix*

In /snap/deja-dup/182/lib/python3.6/site-packages/duplicity/backends/_boto_single.py, wrap all occurences of 'remote_filename' in a call to 'util.fsdecode(...)'.
Potentially, there are other variables concerned as well.

Thanks.

Related branches

Manuel J. (maennel)
description: updated
Revision history for this message
Michael Terry (mterry) wrote :

Duplicity patch here: https://code.launchpad.net/~mterry/duplicity/s3fsdecode/+merge/369429

A new snap with it included is coming.

Revision history for this message
Michael Terry (mterry) wrote :

(Thanks for the report!)

Revision history for this message
Manuel J. (maennel) wrote :

Hi Michael, thank you for the quick reply and fix! Backups work with the latest version.

Changed in duplicity:
status: New → Fix Committed
importance: Undecided → Medium
milestone: none → 0.8.01
Changed in duplicity:
status: Fix Committed → Fix Released
Michael Terry (mterry)
Changed in deja-dup:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.