Failure in folders with names in UTF8 (Brazil/Portuguese pt_BR)

Bug #1179466 reported by modolo
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Duplicity
Fix Released
Undecided
Unassigned
Debian
New
Undecided
Unassigned

Bug Description

Duplicity version: 0.6.21-0ubuntu1
Python version: Python 2.7.4
OS Distro and version: lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 13.04
Release: 13.04
Codename: raring

If I set security backups using the tool DejaDup in Ubuntu and any file or folder names in use 'pt_BR' end up with the below error:

Traceback (most recent call last):
  File "/usr/bin/duplicity", line 1411, in <module>
    with_tempdir(main)
  File "/usr/bin/duplicity", line 1404, in with_tempdir
    fn()
  File "/usr/bin/duplicity", line 1286, in main
    globals.archive_dir).set_values()
  File "/usr/lib/python2.7/dist-packages/duplicity/collections.py", line 693, in set_values
    self.get_backup_chains(partials + backend_filename_list)
  File "/usr/lib/python2.7/dist-packages/duplicity/collections.py", line 816, in get_backup_chains
    map(add_to_sets, filename_list)
  File "/usr/lib/python2.7/dist-packages/duplicity/collections.py", line 810, in add_to_sets
    log.Debug(_("File %s is not part of a known set; creating new set") % (filename,))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 4: ordinal not in range(128)

I have found that adding the following line in the / usr/lib/python2.7/dist-packages/duplicity/collections.py the error disappears and the backup is done successfully:

_ = t.lgettext

Revision history for this message
David Dahlberg (david-dahlberg-fkie) wrote :

Same seems to exist problem on Debian/testing, package "duplicity_0.6.23-1_amd64".
This one could be related: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=744064

Revision history for this message
David Dahlberg (david-dahlberg-fkie) wrote :

Bug #1286845 looks pretty similar, too. Yet the problem seems to be deeper (or more "prints" are affected than just the one mentioned there): Upgrading to 0.6.23-1ubuntu4 did /not/ help here.

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

This is fixed -- that line is now:
                log.Debug(_("File %s is not part of a known set; creating new set") % (util.ufn(filename),))
Where the util.ufn will translate the filename to proper unicode.

Changed in duplicity:
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

Bug attachments

Remote bug watches

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