AttributeError: 'list' object has no attribute 'startswith' when using verify

Bug #1165263 reported by iceflatline
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Duplicity
New
Undecided
Unassigned

Bug Description

I am encountering the following error when running the following verify command on FreeBSD 9.1-RELEASE:

/usr/local/bin/duplicity verify --include /mnt/files/backup/ --exclude '**' scp://backup@192.168.20.6//mnt/files/weekly/ /mnt/files/

Traceback (most recent call last):
  File "/usr/local/bin/duplicity", line 1411, in <module>
    with_tempdir(main)
  File "/usr/local/bin/duplicity", line 1404, in with_tempdir
    fn()
  File "/usr/local/bin/duplicity", line 1257, in main
    action = commandline.ProcessCommandLine(sys.argv[1:])
  File "/usr/local/lib/python2.7/site-packages/duplicity/commandline.py", line 1013, in ProcessCommandLine
    backup, local_pathname = set_backend(args[0], args[1])
  File "/usr/local/lib/python2.7/site-packages/duplicity/commandline.py", line 906, in set_backend
    globals.backend = backend.get_backend(bend)
  File "/usr/local/lib/python2.7/site-packages/duplicity/backend.py", line 161, in get_backend
    return _backends[pu.scheme](pu)
  File "/usr/local/lib/python2.7/site-packages/duplicity/backends/_ssh_paramiko.py", line 159, in __init__
    self.config['identityfile'])
  File "/usr/local/lib/python2.7/posixpath.py", line 252, in expanduser
    if not path.startswith('~'):
AttributeError: 'list' object has no attribute 'startswith'

Revision history for this message
Tom Callahan (anomaly) wrote :

I was able to get this working by inserting the following between lines 158 and 159 of _ssh_paramiko.py

            if isinstance(self.config['identityfile'], list):
                self.config['identityfile'] = self.config['identityfile'][0]

Revision history for this message
iceflatline (iceflatline) wrote :

I was not able to correct the problem by inserting Tom's code between lines 158 and 159 of /usr/local/lib/python2.7/site-packages/duplicity/backends/_ssh_paramiko.py . However I was able to correct the problem by *replacing* lines 157-159 with this code.

Revision history for this message
Andrew Stubbs (ams-codesourcery) wrote :

A workaround is to specify the Identity file on the command line:

  duplicity .... --ssh-options="-oIdentityFile=<file>" ....

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.