CygWin: TypeError: basis_file must be a (true) file, while restoring inremental backup or file

Bug #1494228 reported by Olle Lukoie on 2015-09-10
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

This is a resurrection of 670891 ( The same symptoms and the same solution probably.
 I'm using CygWin under Windows 7. Duplicity is downloaded from the home page and built from scratch with command "python install".
$ duplicity -V
duplicity 0.7.04
When trying to restore a specific file (with deltas) or a full backup with deltas - I'm getting 'TypeError: basis_file must be a (true) file'. It's the regression of 670891. It was fixed in 0.6.12 (I looked at the code of that version), there is "os.tmpfile()" in spite of "tempfile.TemporaryFile", but now it employs TemporaryFile again.
I tried to fix the problem with replacing "tempfp = tempfile.TemporaryFile(dir=tempdir.default().dir())" with "tempfp = os.tmpfile()" and the error has gone, but I'm not sure it's the blessed way to do it.

Full command line log is attached.

Olle Lukoie (irruel-4) wrote :

The problem that caused the change to tempfile.TemporaryFile was due to the fact that os.tmpfile always creates its file in the system temp directory, not in the directory specified. The fix I applied was to use os.tmpfile in cygwin/windows and tempfile.TemporaryFile in all the rest. This means that cygwin is now broken with respect to temp file placement of this one file (deleted automatically on close).

Changed in duplicity:
importance: Undecided → Medium
milestone: none → 0.7.05
status: New → Fix Committed
Olle Lukoie (irruel-4) wrote :

I believe that's better than broken duplicity. Thank you so much for quick response!

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

Other bug subscribers

Bug attachments