Skip to content

CopyFile2 not supported in Windows 7 #3259

@ghost

Description

A user reported on discord that dvc add was throwing the following error:

ERROR: unexpected error - function 'CopyFile2' not found

Here's the output of dvc version:

DVC version: 0.82.6
Python version: 3.6.3
Platform: Windows-7-6.1.7601-SP1
Binary: False
Package: pip
Cache: reflink - not supported, hardlink - supported, symlink - not supported

We are using CopyFile2 on Windows to increase the performance of copy (see speedcopy), but that system call was introduced in Windows 8.

The solution was to pip uninstall speedcopy and let DVC fallback to Python's copy implementation.

What should we do?

  • Catch AttributeError: function 'CopyFile2' not found and output an actionable error message to fix it.
  • State in README / docs that we don't support < Windows 8?
  • Nothing?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions