From 195bddc0dd7e8cda3786e0ac17cfb08e53201a67 Mon Sep 17 00:00:00 2001 From: q Date: Fri, 22 Aug 2025 12:32:44 +0300 Subject: [PATCH] version 0.7.11. add exception when having only 1 point --- tsmark/__init__.py | 2 +- tsmark/video_annotator.py | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/tsmark/__init__.py b/tsmark/__init__.py index 7fcddbf..8449125 100644 --- a/tsmark/__init__.py +++ b/tsmark/__init__.py @@ -2,7 +2,7 @@ import argparse from tsmark.video_annotator import Marker -VERSION = "0.7.10" +VERSION = "0.7.11" class SmartFormatter(argparse.HelpFormatter): diff --git a/tsmark/video_annotator.py b/tsmark/video_annotator.py index a5b9326..4aa88ed 100755 --- a/tsmark/video_annotator.py +++ b/tsmark/video_annotator.py @@ -323,10 +323,7 @@ class Marker: history = np.array(history, np.int32).reshape((-1, 1, 2)) cv2.polylines(frame, [history], False, COLOR_INTERP, 1) - except KeyError: - print(self.get_interpolated_point(), self.nr) - pass - except IndexError: + except (KeyError, IndexError, TypeError): print(self.get_interpolated_point(), self.nr) pass try: