Skip to content

Commit

Permalink
Hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
talmo committed Aug 2, 2024
1 parent 5b79a22 commit bb025cf
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
23 changes: 14 additions & 9 deletions sleap_io/io/slp.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,21 @@ def make_video(
is_embedded = True

# Basic path resolution.
video_path = video_path.replace("\\", "/")
video_path = Path(video_path)
if not video_path.exists():
# Check for the same filename in the same directory as the labels file.
video_path_ = Path(labels_path).parent / video_path.name
if video_path_.exists():
video_path = video_path_
else:
# TODO (TP): Expand capabilities of path resolution to support more
# complex path finding strategies.
pass

try:
if not video_path.exists():
# Check for the same filename in the same directory as the labels file.
video_path_ = Path(labels_path).parent / video_path.name
if video_path_.exists():
video_path = video_path_
else:
# TODO (TP): Expand capabilities of path resolution to support more
# complex path finding strategies.
pass
except OSError:
pass

# Convert video path to string.
video_path = video_path.as_posix()
Expand Down
2 changes: 1 addition & 1 deletion sleap_io/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

# Define package version.
# This is read dynamically by setuptools in pyproject.toml to determine the release version.
__version__ = "0.1.6"
__version__ = "0.1.7"

0 comments on commit bb025cf

Please sign in to comment.