Failure due to _logger.log failure for content with special characters: TypeError decoding Unicode not supported
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Duplicity |
Fix Released
|
Medium
|
Unassigned | ||
0.5 |
Fix Released
|
Medium
|
Unassigned | ||
0.6 |
Fix Released
|
Medium
|
Unassigned |
Bug Description
-- duplicity 0.6.04 (but error was also present with earlier version) from duplicity-team PPA
-- Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41) [GCC 4.3.3] on linux2
-- Ubuntu 9.04
-- command line (please note "@" and ":" in part before the webdavs-server name): duplicity --log-file ~/tmp/dpl.log /home/abc/def/ webdavs://<email address hidden>:<email address hidden>/xyz
-- from dpl.log:
Traceback (most recent call last):
File "/usr/bin/
with_
File "/usr/bin/
fn()
File "/usr/bin/
sync_archive()
File "/usr/bin/
remlist = globals.
File "/usr/lib/
filename = self.__
File "/usr/lib/
"%s -> %s" % (raw_filename, filename))
File "/usr/lib/
Log(s, DEBUG)
File "/usr/lib/
_logger.
TypeError: decoding Unicode is not supported
Please note that this error from _logger.log is triggered at several places; for example, the command line above would raise the error from line 201 in webdavbackend.py but also by line 810 in collections.py etc.
Many thanks for your attention - kind regards
summary: |
- Fail due to _logger.log failure for filenames / URLs with special - characters fails - TypeError decoding Unicode not supported + Failure due to _logger.log failure for content with special characters: + TypeError decoding Unicode not supported |
Changed in duplicity: | |
importance: | Undecided → Medium |
status: | New → In Progress |
milestone: | none → 0.6.05 |
Changed in duplicity: | |
status: | In Progress → Fix Committed |
It looks like Ken changed this:
_logger. log(DupToLogger Level(verb_ level), s)
to this:
_logger. log(DupToLogger Level(verb_ level), unicode(s, "utf8", errors='ignore'))
the purpose being to "ignore unicode() tignore unicode() translation errors in log messsages." But TypeError gets thrown by unicode() when it's given something that's already of type unicode.
I'm a little nervous about fixing this one myself because I don't understand the circumstances that would have caused the original bug that required the change above.