From 98c96dc4b353216bd46dc66643a1fb7191eb9a24 Mon Sep 17 00:00:00 2001 From: getzze Date: Sat, 3 Aug 2024 00:19:18 +0100 Subject: [PATCH] convert Path to str --- sleap/nn/inference.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sleap/nn/inference.py b/sleap/nn/inference.py index 1866d2fc5..f07c228cc 100644 --- a/sleap/nn/inference.py +++ b/sleap/nn/inference.py @@ -5652,7 +5652,7 @@ def main(args: Optional[list] = None): # Load predictions print("Loading predictions...") - labels_pr = sleap.load_file(data_path) + labels_pr = sleap.load_file(data_path.as_posix()) frames = sorted(labels_pr.labeled_frames, key=lambda lf: lf.frame_idx) if provider.example_indices is not None: # Convert indices to a set to search in O(1), otherwise it is much slower @@ -5681,7 +5681,7 @@ def main(args: Optional[list] = None): labels_pr.provenance["sleap_version"] = sleap.__version__ labels_pr.provenance["platform"] = platform.platform() labels_pr.provenance["command"] = " ".join(sys.argv) - labels_pr.provenance["data_path"] = data_path + labels_pr.provenance["data_path"] = os.fspath(data_path) labels_pr.provenance["output_path"] = output_path labels_pr.provenance["total_elapsed"] = total_elapsed labels_pr.provenance["start_timestamp"] = start_timestamp