diff --git a/dvc/utils/compat.py b/dvc/utils/compat.py index 372c8d2c6..ab079c1d0 100644 --- a/dvc/utils/compat.py +++ b/dvc/utils/compat.py @@ -207,6 +207,12 @@ except ImportError: except AttributeError: if hasattr(path_type, "__fspath__"): raise + + # Support for pathlib.Path in Python 3.5, since it doesn't + # implement `__fspath__` + if isinstance(path, pathlib.Path): + return str(path) + else: raise TypeError( "expected str, bytes or os.PathLike object, "