dlucian/ScreenTrail

IndexError: list index out of range

Closed this issue · 1 comments

VID 1: Creating video writer for display in output/2023-05-02_16-34-07_D1.mp4...
Display 0: 121 frames written.
Got monitor 0 / {'left': 0, 'top': 0, 'width': 3008, 'height': 1692}...
Got monitor 1 / {'left': 614, 'top': 1692, 'width': 1728, 'height': 1117}...
VID 0: Creating video writer for display in output/2023-05-02_16-44-02_D0.mp4...
Display 1: 120 frames written.
Got monitor 0 / {'left': 0, 'top': 0, 'width': 3008, 'height': 1692}...
Got monitor 1 / {'left': 614, 'top': 1692, 'width': 1728, 'height': 1117}...
VID 1: Creating video writer for display in output/2023-05-02_16-44-07_D1.mp4...
Screen configuration changed
Screen configuration changed
Refreshing video writers...
Releasing video writers...
Display 0: 67 frames written.
Display 1: 66 frames written.
Got monitor 0 / {'left': 0, 'top': 0, 'width': 1728, 'height': 1117}...
VID 0: Creating video writer for display in output/2023-05-02_16-49-36_D0.mp4...
Screen configuration changed
Refreshing video writers...
Releasing video writers...
Display 0: 1 frames written.
Exception in thread Thread-1 (timer_thread):
Traceback (most recent call last):
  File "/opt/homebrew/Cellar/python@3.11/3.11.2_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
    self.run()
  File "/opt/homebrew/Cellar/python@3.11/3.11.2_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/threading.py", line 975, in run
    self._target(*self._args, **self._kwargs)
  File "..././main.py", line 96, in timer_thread
    NSRunLoop.currentRunLoop().run()
  File "..././main.py", line 114, in timer_callback_
    if (datetime.now() - self.video_writer_start_times[display_num]).seconds >= SCREENSHOT_SAVE_INTERVAL:
                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
IndexError: list index out of range
Releasing video writers...

was fixed.