Fixes tagged Python
6 fixes · back to all fixes
My href regex found 0 links on a page with 101 of them
A link-extraction regex returned nothing on a page full of links. The page was fine. It ships minified HTML, where quotes around an attribute value are optional, so href=/media/x.pdf matches nothing that expects href="...".
5 min read →
IndentationError on a line that is a comment, because a backtick in it ran as a shell command
A git hook broke on every commit with an IndentationError pointing at a comment. The comment mentioned a command in backticks, the whole Python program was inside a double-quoted shell argument, and the shell had run the command and pasted its output into the source.
5 min read →
Every take passed the check and the voice still changed between lines
A generated narration changed speaker every few lines. The quality gate that existed to catch exactly that passed all 17 lines on the first take, word perfect. The gate scored transcript similarity, and a transcriber cannot hear pitch, so the defect sat in full view of a check that was structurally incapable of seeing it.
6 min read →
zipfile append mode corrupted four of six product zips and only testzip() noticed
Adding one file to six archives with ZipFile(path, "a") succeeded every time. The files opened, namelist() was correct, and four of the six were damaged. Only testzip() could see it, and the damage was in files nobody touched.
4 min read →
We decided it three weeks ago and I could not find it
Claude Code writes every session to disk as JSONL and nothing reads them back. So a decision, a number, or the reason you rejected something is gone in practice the moment it scrolls out of context, even though the bytes are sitting in your home directory. Here is what searching them actually takes, including the three things that make the naive version fail.
6 min read →
DETACHED_PROCESS is why your background job pops console windows
A Python git hook flashed a black console window on every commit. The flag meant to hide it was causing it, but not in the way everyone says: DETACHED_PROCESS opens no window itself. It leaves the child with no console, so every console program that child runs gets a fresh visible one.
5 min read →