Skip to content

Commit

Permalink
Feedback when user drops invalid file type
Browse files Browse the repository at this point in the history
  • Loading branch information
roomrys committed Aug 11, 2023
1 parent 9860051 commit 69f526a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions sleap/gui/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,12 @@ def dropEvent(self, event):
# Import videos
self.commands.showImportVideos(filenames=filenames)

else:
raise TypeError(
f"Invalid file type(s) dropped: {', '.join(exts)} \n"
f"Expected formats: .slp, .{', .'.join(available_video_exts())}"
)

@property
def labels(self) -> Labels:
return self.state["labels"]
Expand Down

0 comments on commit 69f526a

Please sign in to comment.