Skip to content

Commit

Permalink
Improve error message in wrong file type in video
Browse files Browse the repository at this point in the history
  • Loading branch information
joaqo committed Sep 11, 2020
1 parent 64d7929 commit 642f052
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions norfair/video.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ def __init__(
self.video_capture = cv2.VideoCapture(self.input_path)
total_frames = int(self.video_capture.get(cv2.CAP_PROP_FRAME_COUNT))
if total_frames == 0:
fail_msg = "[bold red]Error:[/bold red] '{self.input_path}' is not a video file supported by OpenCV."
self._fail(fail_msg)
self._fail(f"[bold red]Error:[/bold red] '{self.input_path}' does not seem to be a video file supported by OpenCV. If the video file is not the problem, please check that your OpenCV installation is working correctly.")
description = os.path.basename(self.input_path)
else:
self.video_capture = cv2.VideoCapture(self.camera)
Expand Down

0 comments on commit 642f052

Please sign in to comment.