Bug#682837: UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2

July 26th, 2012 - 03:20 am ET by Francois Marier | Report spam
This is a multi-part MIME message sent by reportbug.


MIME-Version: 1.0

Package: duplicity
Version: 0.6.18-2
Severity: normal
Tags: patch

I started seeing these errors every time I do a backup to S3 using duplicity:

Traceback (most recent call last):
File "/usr/bin/duplicity", line 1404, in <module>
with_tempdir(main)
File "/usr/bin/duplicity", line 1397, in with_tempdir
fn()
File "/usr/bin/duplicity", line 1277, in main
globals.archive_dir).set_values()
File "/usr/lib/python2.7/dist-packages/duplicity/collections.py", line 691, in set_values
self.get_backup_chains(partials + backend_filename_list)
File "/usr/lib/python2.7/dist-packages/duplicity/collections.py", line 815, in get_backup_chains
map(add_to_sets, filename_list)
File "/usr/lib/python2.7/dist-packages/duplicity/collections.py", line 805, in add_to_sets
log.Debug(_("File %s is part of known set") % (filename,))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 16: ordinal not in range(128)

Traceback (most recent call last):
File "/usr/bin/duplicity", line 1404, in <module>
with_tempdir(main)
File "/usr/bin/duplicity", line 1397, in with_tempdir
fn()
File "/usr/bin/duplicity", line 1277, in main
globals.archive_dir).set_values()
File "/usr/lib/python2.7/dist-packages/duplicity/collections.py", line 691, in set_values
self.get_backup_chains(partials + backend_filename_list)
File "/usr/lib/python2.7/dist-packages/duplicity/collections.py", line 814, in get_backup_chains
map(add_to_sets, filename_list)
File "/usr/lib/python2.7/dist-packages/duplicity/collections.py", line 808, 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 0xe2 in position 23: ordinal not in range(128)

Attached is the patch I applied to make these errors go away.

Cheers,
Francois

Debian Release: wheezy/sid
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.4.5-grsec+ (SMP w/2 CPU cores)
Locale: LANG=fr_CA.utf8, LC_CTYPE=fr_CA.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages duplicity depends on:
ii libc6 2.13-35
ii librsync1 0.9.7-9
ii python 2.7.3-1
ii python-gnupginterface 0.3.2-9.1
ii python2.7 2.7.3-2

Versions of packages duplicity recommends:
ii python-paramiko 1.7.7.1-3
ii rsync 3.0.9-3

Versions of packages duplicity suggests:
pn lftp <none>
ii ncftp 2:3.2.5-1.1
ii python-boto 2.3.0-1
pn python-cloudfiles <none>
pn python-gdata <none>
ii python-pexpect 2.4-1
pn tahoe-lafs <none>


MIME-Version: 1.0

duplicity/collections.py 2012-03-01 08:24:04.000000000 +1300
+++ /home/francois/collections.py 2012-07-26 19:08:51.692698922 +1200
@@ -807,15 +802,16 @@
"""
for set in sets:
if set.add_filename(filename):
- log.Debug(_("File %s is part of known set") % (filename,))
+ #log.Debug(_("File %s is part of known set") % (filename,))
break
else:
- log.Debug(_("File %s is not part of a known set; creating new set") % (filename,))
+ #log.Debug(_("File %s is not part of a known set; creating new set") % (filename,))
new_set = BackupSet(self.backend)
if new_set.add_filename(filename):
sets.append(new_set)
else:
- log.Debug(_("Ignoring file (rejected by backup set) '%s'") % filename)
+ #log.Debug(_("Ignoring file (rejected by backup set) '%s'") % filename)
+ pass
map(add_to_sets, filename_list)
sets, incomplete_sets = self.get_sorted_sets(sets)




To UNSUBSCRIBE, email to debian-bugs-dist-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
email Follow the discussionReplies 2 repliesReplies Make a reply

Replies

#1 Alexander Zangerl
July 27th, 2012 - 10:20 pm ET | Report spam
=_1343441034-4324-61

forwarded 682837 https://bugs.launchpad.net/duplicity/+bug/1030199
tags 682837 - patch
tags 682837 + upstream
thanks

On Thu, 26 Jul 2012 19:15:04 +1200, Francois Marier writes:
I started seeing these errors every time I do a backup to S3 using duplicity:
log.Debug(_("File %s is part of known set") % (filename,))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 16:
ordinal not in range(128)



that's because your filenames contain latin-1 characters. duplicity's log
module can only work with utf8 or plain ascii. i've reported this issue
upstream.

Attached is the patch I applied to make these errors go away.



sorry, but that patch isn't just getting rid of the errors but
removes the logging functionality altogether, without which duplicity
problems can't be diagnosed properly.

regards
az


Alexander Zangerl + GnuPG Keys 0x42BD645D or 0x5B586291 + http://snafu.priv.at/
Fachbegriffe der Informatik, Zertifiziernung: Ein Geschàftsmodell, das heisse
Luft zu Papier verdichtet und dann gegen Wàhrung tauscht. -- Jörg Dorchain

=_1343441034-4324-61


=_1343441034-4324-61--


To UNSUBSCRIBE, email to
with a subject of "unsubscribe". Trouble? Contact

Similar topics