Skip to content

Conversation

@kngwyu
Copy link
Contributor

@kngwyu kngwyu commented Dec 6, 2022

Show errors if video creation fails, like:
image

When prot_trajectry is checked:
image

Currently, the message Labeled videos created. is shown regardless of the result.
If I check plot_trajectory, the exception below is thrown (for a single animal case), which I don't feel very kind.

FileNotFoundError: No unfiltered data file found in /home/yuji/Videos/...
During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/yuji/Programs/DeepLabCut/deeplabcut/gui/tabs/create_videos.py", line 241, in create_videos
    deeplabcut.plot_trajectories(
  File "/home/yuji/Programs/DeepLabCut/deeplabcut/utils/plotting.py", line 321, in plot_trajectories
    _ = auxiliaryfunctions.load_detection_data(
  File "/home/yuji/Programs/DeepLabCut/deeplabcut/utils/auxiliaryfunctions.py", line 792, in load_detection_data
    raise ValueError(f"Unrecognized track_method={track_method}")
ValueError: Unrecognized track_method=

@kngwyu kngwyu force-pushed the better-error-video-gui branch from c245c66 to 7aeb7ca Compare December 6, 2022 05:08
@kngwyu
Copy link
Contributor Author

kngwyu commented Dec 6, 2022

Note that I tested this PR with #2074, which is not included in this PR.

@MMathisLab MMathisLab requested a review from jeylau December 20, 2022 19:26
Copy link
Contributor

@jeylau jeylau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks @kngwyu!

@MMathisLab MMathisLab merged commit 1559dca into DeepLabCut:main Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants