Running app-swt-detection (v8.6, classifier path) over some Matroska/webm videos extracts zero frames: the classifier loop never runs and the request ends in a 500 with TypeError: 'NoneType' object is not iterable at the output stage. Root cause not yet confirmed. I observed the frameCount value is correct immediately after vdh.capture() (cv2-based video reader code), but the value used a few lines later to compute the total timeline has become 0, so the image extraction start/end window is 0..0 and nothing is sampled. With zero frames classified, the result accumulator stays None and the output loop (which has no empty-input guard) raises the TypeError.
Suspected area
After the PyAV migration (#379) , SWT's classifier path still uses the older cv2-backed helpers (vdh.capture, vdh.extract_frames_as_images) alongside newer code (vdh.get_framerate, tuh.convert). The frameCount appears correct when cv2 sets it but 0 by the time it is consumed, so a mismatch between the cv2 and PyAV code paths (or between how a document property is written vs. read) is the leading suspect. Not confirmed.
Open questions
- Why does
frameCount change from a correct value to 0 between being set and being read, with no explicit reset in between? - Is the collapse specific to the cv2 path, the PyAV path, or their interaction?
- Independent of the above: SWT should handle "zero frames extracted" gracefully rather than 500-ing with an opaque
TypeError.
Running
app-swt-detection(v8.6, classifier path) over some Matroska/webm videos extracts zero frames: the classifier loop never runs and the request ends in a500withTypeError: 'NoneType' object is not iterableat the output stage. Root cause not yet confirmed. I observed theframeCountvalue is correct immediately aftervdh.capture()(cv2-based video reader code), but the value used a few lines later to compute the total timeline has become0, so the image extraction start/end window is0..0and nothing is sampled. With zero frames classified, the result accumulator staysNoneand the output loop (which has no empty-input guard) raises theTypeError.Suspected area
After the PyAV migration (#379) , SWT's classifier path still uses the older cv2-backed helpers (
vdh.capture,vdh.extract_frames_as_images) alongside newer code (vdh.get_framerate,tuh.convert). TheframeCountappears correct when cv2 sets it but0by the time it is consumed, so a mismatch between the cv2 and PyAV code paths (or between how a document property is written vs. read) is the leading suspect. Not confirmed.Open questions
frameCountchange from a correct value to0between being set and being read, with no explicit reset in between?TypeError.