aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/argaze/DataStructures.py2
-rw-r--r--src/argaze/utils/tobii_segment_aruco_aoi_export.py2
-rw-r--r--src/argaze/utils/tobii_segment_display.py6
-rw-r--r--src/argaze/utils/tobii_segment_gaze_movements_export.py2
4 files changed, 6 insertions, 6 deletions
diff --git a/src/argaze/DataStructures.py b/src/argaze/DataStructures.py
index ffdfe8b..c86d021 100644
--- a/src/argaze/DataStructures.py
+++ b/src/argaze/DataStructures.py
@@ -54,7 +54,7 @@ class TimeStampedBuffer(collections.OrderedDict):
# when no timestamped have been found
if earliest_ts == None:
- raise ValueError
+ raise KeyError
popep_ts, poped_value = self.pop_first()
diff --git a/src/argaze/utils/tobii_segment_aruco_aoi_export.py b/src/argaze/utils/tobii_segment_aruco_aoi_export.py
index 25ea334..5e19b40 100644
--- a/src/argaze/utils/tobii_segment_aruco_aoi_export.py
+++ b/src/argaze/utils/tobii_segment_aruco_aoi_export.py
@@ -258,7 +258,7 @@ def main():
cv.putText(visu_frame.matrix, str(w), (20, 80), cv.FONT_HERSHEY_SIMPLEX, 1, (0, 255, 255), 1, cv.LINE_AA)
# Raised when timestamped buffer is empty
- except ValueError:
+ except KeyError:
pass
# Draw focus area
diff --git a/src/argaze/utils/tobii_segment_display.py b/src/argaze/utils/tobii_segment_display.py
index 7997d37..b96265c 100644
--- a/src/argaze/utils/tobii_segment_display.py
+++ b/src/argaze/utils/tobii_segment_display.py
@@ -74,7 +74,7 @@ def main():
cv.line(video_frame.matrix, (int(video_frame.width/2), int(video_frame.height/2)), (int(video_frame.width/2) + head_movement_px[1], int(video_frame.height/2) - head_movement_px[0]), (150, 150, 150), 3)
# Wait for head rotation
- except ValueError:
+ except KeyError:
pass
try:
@@ -102,7 +102,7 @@ def main():
gaze_position_pixel.draw(video_frame.matrix)
# Wait for gaze position
- except ValueError:
+ except KeyError:
pass
try:
@@ -117,7 +117,7 @@ def main():
cv.putText(video_frame.matrix, str(nearest_event), (20, 140), cv.FONT_HERSHEY_SIMPLEX, 1, (255, 255, 255), 1, cv.LINE_AA)
# Wait for events
- except ValueError:
+ except KeyError:
pass
# Draw center
diff --git a/src/argaze/utils/tobii_segment_gaze_movements_export.py b/src/argaze/utils/tobii_segment_gaze_movements_export.py
index 1047065..80e4836 100644
--- a/src/argaze/utils/tobii_segment_gaze_movements_export.py
+++ b/src/argaze/utils/tobii_segment_gaze_movements_export.py
@@ -219,7 +219,7 @@ def main():
nearest_gaze_position.draw(video_frame.matrix)
# Wait for gaze position
- except ValueError:
+ except KeyError:
pass
# Write segment timing