`csv.Error: field larger than field limit (131072)`
IntermediateTroubleshootingRuntime, file, subprocess & encoding errors
Answer
Likely causes → A field exceeds the csv module's default size limit, often because a quote is unbalanced and the parser swallows the rest of the file into one field.
Diagnose →
awk -F'"' 'NF % 2 == 0 {print NR": "$0}' data.csv | head
Fix → Fix the malformed quoting at the source. If fields are genuinely large, raise the limit with csv.field_size_limit(sys.maxsize) (on some platforms use a smaller value like 2**31 - 1).
Prevent → Always produce CSV with the csv module (correct quoting), not string joins.
More on Runtime, file, subprocess & encoding errors
`KeyError: 'Tags'` while processing `describe_instances` output.Beginner`TypeError: can't compare offset-naive and offset-aware datetimes` in a snapshot-age check.Beginner`UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte` reading a log file.Intermediate`UnicodeEncodeError: 'ascii' codec can't encode character '✓'` when printing in a container.Intermediate`PermissionError: [Errno 13] Permission denied: '/var/log/app/report.json'`Intermediate`OSError: [Errno 24] Too many open files` in a long-running Python service.Intermediate