From 642f052ffbba9a57a2350c6394d5826a003c1f7e Mon Sep 17 00:00:00 2001 From: joaqo Date: Fri, 11 Sep 2020 12:23:01 -0300 Subject: [PATCH] Improve error message in wrong file type in video --- norfair/video.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/norfair/video.py b/norfair/video.py index bf26e8d7..c4118dd3 100644 --- a/norfair/video.py +++ b/norfair/video.py @@ -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)