Skip to content

Commit 7a40c59

Browse files
Conchylicultorcopybara-github
authored andcommitted
Fix _checksums_path for zipapp
PiperOrigin-RevId: 350341479
1 parent e9b9b6e commit 7a40c59

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tensorflow_datasets/core/dataset_builder.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,9 @@ def _checksums_path(cls) -> ReadOnlyPath:
288288
# Checksums of legacy datasets are located in a separate dir.
289289
legacy_path = utils.tfds_path() / "url_checksums" / f"{cls.name}.txt"
290290
if (
291-
"tensorflow_datasets" in new_path.parts
291+
# zipfile.Path does not have `.parts`. Additionally, `os.fspath`
292+
# will extract the file, so use `str`.
293+
"tensorflow_datasets" in str(new_path)
292294
and legacy_path.exists()
293295
and not new_path.exists()
294296
):

0 commit comments

Comments
 (0)