ai-coding-minesIndexGitHub

`curl -o` writes the 404 body to the file too

Python and databases

Symptom

SyntaxError: illegal target for annotation

An error with no visible cause. The downloaded .py file actually contained the string 404: Not Found.

Fix

curl -fsSL -o out.py URL || echo "download failed"

-f doesn't create the file on failure. Verify immediately after download:

python3 -c "import ast; ast.parse(open('out.py').read()); print('OK')"