duplicity crashed with ValueError in port()

Bug #229826 reported by AlexanderFaucher on 2008-05-13
12
Affects Status Importance Assigned to Milestone
Duplicity
Medium
Unassigned
duplicity (Ubuntu)
Medium
Unassigned

Bug Description

Binary package hint: duplicity

trying to backup to localhost

ProblemType: Crash
Architecture: amd64
Date: Mon May 12 22:52:13 2008
DistroRelease: Ubuntu 8.04
ExecutablePath: /usr/bin/duplicity
InterpreterPath: /usr/bin/python2.5
NonfreeKernelModules: nvidia
Package: duplicity 0.4.10-1
PackageArchitecture: amd64
ProcCmdline: /usr/bin/python /usr/bin/duplicity ./BackupList/ ssh://User Name@localhost:/home/username/Backup
ProcEnviron:
 SHELL=/bin/bash
 PATH=/home/username/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
 LANG=en_US.UTF-8
PythonArgs: ['/usr/bin/duplicity', './BackupList/', 'ssh://User Name@localhost:/home/username/Backup']
SourcePackage: duplicity
Title: duplicity crashed with ValueError in port()
Uname: Linux 2.6.24-16-generic x86_64
UserGroups: adm admin audio cdrom dialout dip floppy fuse lpadmin netdev plugdev powerdev sambashare scanner video

Daniel Hahler (blueyed) wrote :

You need to quote the target, at least, because it contains a space: 'ssh://User Name@localhost:/home/username/Backup' - or has this been cleaned by apport during report?

Anyway, the bug is still valid, because it should not crash, but report a sane error, if the port cannot get parsed. (I've looked not at the source code yet), but it looks like it parsed the URL wrong:
    File "/usr/lib/python2.5/site-packages/duplicity/urlparse_2_5.py", line 116, in port
      return int(port, 10)
  ValueError: invalid literal for int() with base 10: ''

Changed in duplicity:
importance: Undecided → Medium
status: New → Confirmed
flanker (flanker-gmail) wrote :

I know I'm chiming in pretty late here, but this error is not due to spaces. It's because the user entered the target location using a colon at the end of the hostname (which is standard ssh syntax, but not for duplicity according to the man page). Instead of specifying the target as user@localhost:/path/to/backup, one should use user@localhost/path/to/backup. Apparently duplicity interprets the colon to mean that a port number follows. Clearly untrue. The issue of whether a sane error message should be printed still stands.

Changed in duplicity:
assignee: nobody → kenneth-loafman
Changed in duplicity:
importance: Undecided → Medium
status: New → Fix Committed
Changed in duplicity:
assignee: Kenneth Loafman (kenneth-loafman) → nobody

This fix was released in 0.5.10.

Changed in duplicity:
status: Fix Committed → Fix Released
Michael Terry (mterry) wrote :

Karmic has 0.5.18

Changed in duplicity (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers