Unicode error when source directory contains non-ascii character

Bug #1858295 reported by Tobias Wichtrey
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Duplicity
Fix Released
Medium
Unassigned

Bug Description

When trying to back up a directory that contains a non-ascii character , duplicity fails with this message:

/snap/duplicity/33/bin/duplicity:64: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
  if u'--pydevd' in sys.argv or os.getenv(u'PYDEVD', None):
Traceback (innermost last):
  File "/snap/duplicity/33/bin/duplicity", line 101, in <module>
    with_tempdir(main)
  File "/snap/duplicity/33/bin/duplicity", line 87, in with_tempdir
    fn()
  File "/snap/duplicity/current/lib/python2.7/site-packages/duplicity/dup_main.py", line 1526, in main
    action = commandline.ProcessCommandLine(sys.argv[1:])
  File "/snap/duplicity/current/lib/python2.7/site-packages/duplicity/commandline.py", line 1137, in ProcessCommandLine
    args = parse_cmdline_options(cmdline_list)
  File "/snap/duplicity/current/lib/python2.7/site-packages/duplicity/commandline.py", line 745, in parse_cmdline_options
    if u'://' not in args[loc]:
 UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 14: ordinal not in range(128)

I use 0.8.08 (installed via snap)
Python 2.7.15+ (that comes bundled with that snap)
Ubuntu 19.10
Target filesystem doesn't seem to matter, happens with local directory as target as well as with S3
Logs:
duplicity -v9 testö file://target/
/snap/duplicity/33/bin/duplicity:64: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
  if u'--pydevd' in sys.argv or os.getenv(u'PYDEVD', None):
Temporäres Verzeichnis /tmp/duplicity-0KPd5Q-tempdir wird benutzt
Traceback (innermost last):
  File "/snap/duplicity/33/bin/duplicity", line 101, in <module>
    with_tempdir(main)
  File "/snap/duplicity/33/bin/duplicity", line 87, in with_tempdir
    fn()
  File "/snap/duplicity/current/lib/python2.7/site-packages/duplicity/dup_main.py", line 1526, in main
    action = commandline.ProcessCommandLine(sys.argv[1:])
  File "/snap/duplicity/current/lib/python2.7/site-packages/duplicity/commandline.py", line 1137, in ProcessCommandLine
    args = parse_cmdline_options(cmdline_list)
  File "/snap/duplicity/current/lib/python2.7/site-packages/duplicity/commandline.py", line 688, in parse_cmdline_options
    possible = [c for c in commands if c.startswith(cmd)]
 UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 4: ordinal not in range(128)

Changed in duplicity:
status: New → Incomplete
status: Incomplete → Fix Committed
importance: Undecided → Medium
milestone: none → 0.8.09
Changed in duplicity:
status: Fix Committed → Fix Released
Revision history for this message
Tobias Wichtrey (mail-tobias-wichtrey) wrote :

Thanks for the quick fix.
With the new version, I get this error message, though:

Traceback (most recent call last):
  File "/snap/duplicity/45/bin/duplicity", line 31, in <module>
    from future import standard_library
ModuleNotFoundError: No module named 'future'

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.