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.
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). tempdir( main) ProcessCommandL ine(sys. argv[1: ]) milan/Dev/ duplicity/ duplicity/ commandline. py", line 999, in ProcessCommandLine options( cmdline_ list) milan/Dev/ duplicity/ duplicity/ commandline. py", line 560, in parse_cmdline_ options python2. 7/optparse. py", line 1399, in parse_args args(largs, rargs, values) python2. 7/optparse. py", line 1439, in _process_args _process_ long_opt( rargs, values) python2. 7/optparse. py", line 1514, in _process_long_opt process( opt, value, values, self) python2. 7/optparse. py", line 788, in process milan/Dev/ duplicity/ duplicity/ commandline. py", line 171, in take_action python2. 7/optparse. py", line 810, in take_action print_help( ) milan/Dev/ duplicity/ duplicity/ commandline. py", line 198, in print_help write(self. format_ help(). decode( 'utf-8' ).encode( encoding, "replace")) python2. 7/encodings/ utf_8.py" , line 16, in decode utf_8_decode( input, errors, True)
$ bin/duplicity --help
Traceback (most recent call last):
File "bin/duplicity", line 1470, in <module>
with_
File "bin/duplicity", line 1463, in with_tempdir
fn()
File "bin/duplicity", line 1316, in main
action = commandline.
File "/home/
args = parse_cmdline_
File "/home/
(options, args) = parser.parse_args()
File "/usr/lib64/
stop = self._process_
File "/usr/lib64/
self.
File "/usr/lib64/
option.
File "/usr/lib64/
self.action, self.dest, opt, value, values, parser)
File "/home/
self, action, dest, opt, value, values, parser)
File "/usr/lib64/
parser.
File "/home/
file.
File "/usr/lib64/
return codecs.
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. www.wefearchang e.org/2012/ 06/the- right-way- to-internationa lize-your. html
http://
diff -u duplicity/ __init_ _.py /usr/lib64/ python2. 7/site- packages/ duplicity/ __init_ _.py __init_ _.py 2013-08-08 11:15:50.648693111 +0200 python2. 7/site- packages/ duplicity/ __init_ _.py 2013-08-07 23:20:59.716631994 +0200
--- duplicity/
+++ /usr/lib64/
@@ -20,4 +20,4 @@
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
import gettext install( 'duplicity' , codeset='utf8') install( 'duplicity' , codeset='utf8', unicode=True, names='ngettext')
-gettext.
+gettext.