Skip to content

A local video studio for your coding agent. Describe a video in one sentence: your agent directs, your machine renders. Claude Code, Codex, Cursor, Devin and more. No API keys, no uploads.

showtime 0.4.5: the NUL-byte test fixture is not named nul.csv (a Windows device name)

Favio Vázquezfdf29492f1d4
diff --git a/skills/showtime/lib/st/xray.py b/skills/showtime/lib/st/xray.py
index 223cbad..ed5b472 100644
--- a/skills/showtime/lib/st/xray.py
+++ b/skills/showtime/lib/st/xray.py
@@ -516,7 +516,7 @@ def read_event_rows(path: Path) -> Tuple[List[Dict[str, Any]], List[str]]:
if size > MAX_EVENTS_BYTES:
raise ShowtimeError("%s is %.0f MB; an events file may be up to %d MB" % (path.name, size / 1048576.0, MAX_EVENTS_BYTES // 1048576),
hint="keep the events you want in the film (peaks, not the whole signal)")
- with open(path, "rb") as raw: # a NUL byte: csv reads it on some Pythons and drops the row on others
+ with open(path, "rb") as raw: # a NUL byte: csv refuses it before 3.11 and reads it after
at = 0
while True:
chunk = raw.read(1048576)
diff --git a/skills/showtime/tests/test_xray.py b/skills/showtime/tests/test_xray.py
index c3b724c..e6af515 100644
--- a/skills/showtime/tests/test_xray.py
+++ b/skills/showtime/tests/test_xray.py
@@ -1179,7 +1179,7 @@ class ReaderLimits(unittest.TestCase):
def test_a_csv_cell_the_reader_cannot_take_is_a_refusal(self):
self.refused(self.f("wide.csv", "t,note\n1," + "x" * 140000 + "\n"), "cannot read wide.csv as a CSV file")
- self.refused(self.f("nul.csv", "t,note\n1,a\x00b\n"), "NUL byte") # the same on every platform and Python
+ self.refused(self.f("zero-byte.csv", "t,note\n1,a\x00b\n"), "NUL byte") # not "nul.csv": NUL is a device name on Windows
u16 = Path(self.f("u16.csv", "")); u16.write_bytes("t\n1\n".encode("utf-16"))
self.refused(u16, "NUL byte")
self.refused(u16, "UTF-16")