Visitar URL original
fix reintroduced pathlib `resolve()` occurences (see #3349) · DeepLabCut/DeepLabCut@c51a25a · GitHub
Skip to content

Commit c51a25a

Browse files
committed
fix reintroduced pathlib resolve() occurences (see #3349)
1 parent f1e9d97 commit c51a25a

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎deeplabcut/gui/components.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ def update_videos(self):
354354
)
355355

356356
if filenames[0]:
357-
abs_files = [str(Path(vid).resolve()) for vid in filenames[0]]
357+
abs_files = [str(Path(vid).absolute()) for vid in filenames[0]]
358358
self.root.add_video_files(abs_files)
359359

360360
# Optional safety: sync dropdown to selected file suffix
@@ -435,7 +435,7 @@ def select_snapshot(self):
435435
)
436436
# When Canceling a file selection, Qt returns an empty string as selected file
437437
if selected_snapshot:
438-
self.selected_snapshot = str(Path(selected_snapshot).resolve())
438+
self.selected_snapshot = str(Path(selected_snapshot).absolute())
439439

440440
self._update_selected_snapshot_display()
441441

@@ -524,7 +524,7 @@ def _is_model_bu(selected_conditions) -> bool:
524524
selected_conditions = None
525525

526526
# When Canceling a file selection, Qt returns an empty string as selected file
527-
self.selected_conditions = str(Path(selected_conditions).resolve()) if selected_conditions else None
527+
self.selected_conditions = str(Path(selected_conditions).absolute()) if selected_conditions else None
528528

529529
self._update_selected_conditions_display()
530530

‎deeplabcut/pose_estimation_tensorflow/modelzoo/api/superanimal_inference.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ def video_inference(
284284
if len(snapshots) == 0:
285285
raise FileNotFoundError(f"Did not find any super animal snapshots in {weight_folder}")
286286

287-
init_weights = str(Path(snapshots[0]).resolve()).replace(".index", "")
287+
init_weights = str(auxiliaryfunctions.safe_resolve(snapshots[0].with_suffix("")))
288288
test_cfg["init_weights"] = init_weights
289289

290290
test_cfg["num_outputs"] = 1

0 commit comments

Comments
 (0)