Hey, thanks for working on this! ;-)
Unfortunately, with your branch I get a crash directly on start (FWIW, I've
only built duplicity in-tree, and not installed it).
$ bin/duplicity --help
Traceback (most recent call last):
File "bin/duplicity", line 1470, in <module>
with_tempdir(main)
File "bin/duplicity", line 1463, in with_tempdir
fn()
File "bin/duplicity", line 1316, in main
action = commandline.ProcessCommandLine(sys.argv[1:])
File "/home/milan/Dev/duplicity/duplicity/commandline.py", line 999, in
ProcessCommandLine
args = parse_cmdline_options(cmdline_list)
File "/home/milan/Dev/duplicity/duplicity/commandline.py", line 560, in
parse_cmdline_options
(options, args) = parser.parse_args()
File "/usr/lib64/python2.7/optparse.py", line 1399, in parse_args
stop = self._process_args(largs, rargs, values)
File "/usr/lib64/python2.7/optparse.py", line 1439, in _process_args
self._process_long_opt(rargs, values)
File "/usr/lib64/python2.7/optparse.py", line 1514, in _process_long_opt
option.process(opt, value, values, self)
File "/usr/lib64/python2.7/optparse.py", line 788, in process
self.action, self.dest, opt, value, values, parser)
File "/home/milan/Dev/duplicity/duplicity/commandline.py", line 171, in
take_action
self, action, dest, opt, value, values, parser)
File "/usr/lib64/python2.7/optparse.py", line 810, in take_action
parser.print_help()
File "/home/milan/Dev/duplicity/duplicity/commandline.py", line 198, in
print_help
file.write(self.format_help().decode('utf-8').encode(encoding, "replace"))
File "/usr/lib64/python2.7/encodings/utf_8.py", line 16, in decode
return codecs.utf_8_decode(input, errors, True)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position
1997: ordinal not in range(128)
I think you can replicate the problem by using the fr_FR.utf8 locale.
with LC_ALL=C I don't get the problem at all.
Have you considered the following change? I don't know anything about gettext
with Python, but this guy seems to have strong feelings about it.
http://www.wefearchange.org/2012/06/the-right-way-to-internationalize-your.html
diff -u duplicity/__init__.py
/usr/lib64/python2.7/site-packages/duplicity/__init__.py
--- duplicity/__init__.py 2013-08-08 11:15:50.648693111 +0200
+++ /usr/lib64/python2.7/site-packages/duplicity/__init__.py 2013-08-07
23:20:59.716631994 +0200
@@ -20,4 +20,4 @@
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
import gettext
-gettext.install('duplicity', codeset='utf8')
+gettext.install('duplicity', codeset='utf8', unicode=True, names='ngettext')
--
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to duplicity in Ubuntu.
https://bugs.launchpad.net/bugs/989496
Title:
UnicodeDecodeError during backup due to non-utf8 translation
Status in Duplicity - Bandwidth Efficient Encrypted Backup:
Fix Released
Status in One Hundred Papercuts:
Fix Released
Status in “duplicity” package in Ubuntu:
Fix Released
Bug description:
Backup failed (unknown error)... deja-dup/ubuntuone
Traceback (most recent call last):
File "/usr/bin/duplicity", line 1403, in <module>
with_tempdir(main)
File "/usr/bin/duplicity", line 1396, in with_tempdir
fn()
File "/usr/bin/duplicity", line 1366, in main
full_backup(col_stats)
File "/usr/bin/duplicity", line 491, in full_backup
bytes_written = dummy_backup(tarblock_iter)
File "/usr/bin/duplicity", line 197, in dummy_backup
while tarblock_iter.next():
File "/usr/lib/python2.7/dist-packages/duplicity/diffdir.py", line 507, in
next
result = self.process(self.input_iter.next(), size)
File "/usr/lib/python2.7/dist-packages/duplicity/diffdir.py", line 188, in
get_delta_iter
for new_path, sig_path in collated:
File "/usr/lib/python2.7/dist-packages/duplicity/diffdir.py", line 281, in
collate2iters
for relem1 in riter1:
File "/usr/lib/python2.7/dist-packages/duplicity/selection.py", line 187,
in Iterate
log.Debug(_("Selecting %s") % subpath.name)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xd1 in position 117:
invalid continuation byte
ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: deja-dup 22.0-0ubuntu2
ProcVersionSignature: Ubuntu 3.2.0-24.37-generic 3.2.14
Uname: Linux 3.2.0-24-generic x86_64
ApportVersion: 2.0.1-0ubuntu6
Architecture: amd64
Date: Fri Apr 27 11:49:30 2012
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release amd64 (20100429)
ProcEnviron:
TERM=xterm
PATH=(custom, no user)
LANG=ru_UA.UTF-8
SHELL=/bin/bash
SourcePackage: deja-dup
UpgradeStatus: No upgrade log present (probably fresh install)
modified.conffile..etc.xdg.autostart.deja.dup.monitor.desktop: [modified]
mtime.conffile..etc.xdg.autostart.deja.dup.monitor.desktop:
2012-02-14T14:17:23.600015
To manage notifications about this bug go to:
https://bugs.launchpad.net/duplicity/+bug/989496/+subscriptions
--
Mailing list: https://launchpad.net/~desktop-packages
Post to : [email protected]
Unsubscribe : https://launchpad.net/~desktop-packages
More help : https://help.launchpad.net/ListHelp