unicode problem in tempdir.py
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| Duplicity |
Medium
|
Unassigned |
Bug Description
Version 0.8.0.6. Before I had 0.7* which worked.
Running with Python2.7
File "/usr/local/
log.
UnicodeDecodeE
Problem seems to be that _() returns str while self.__dir is unicode.
_() in my case returns:
Temporäres Verzeichnis %s wird benutzt
I am assuming of course that duplicity still supports Python2
So I tried
python3 setup.py install
but the shebang in /usr/local/
Next I changed the shebang to /usr/bin/env python3, now it works.
The same here on 0.8.07.
_() function (alias of gettext module) is returning translation as strings not unicode, so when env LANGUAGE=en there is no error but if you set it to language that has accented words you have the error (e.g. 'de' or 'pl').
I fix it for me on Ubuntu 16.04 by changing duplicity/
gettext.
and disabling OPHelpFix by changing duplicity/
parser = OptionParser(
Now it works for me on Python 2 and 3.
now it should be:
duplicity/
parser = optparse.
Changed in duplicity: | |
assignee: | nobody → Kenneth Loafman (kenneth-loafman) |
importance: | Undecided → Medium |
milestone: | none → 0.8.08 |
status: | New → In Progress |
Changed in duplicity: | |
assignee: | Kenneth Loafman (kenneth-loafman) → nobody |
status: | In Progress → Fix Committed |
I've seen you committed my fix, I'm glad I could help.
Kenneth Loafman (kenneth-loafman) wrote : | #6 |
I appreciate any help! Thanks!
After commenting that out, the same problem appears in commandline.py:
File "/usr/local/ lib/python2. 7/dist- packages/ duplicity/ commandline. py", line 1003, in usage rror: 'ascii' codec can't decode byte 0xc3 in position 2: ordinal not in range(128)
""" % dict
UnicodeDecodeE