Skip to content

Instantly share code, notes, and snippets.

@kerin
Created December 18, 2013 11:55
Show Gist options
  • Save kerin/8021118 to your computer and use it in GitHub Desktop.
Save kerin/8021118 to your computer and use it in GitHub Desktop.
try:
for i, row in enumerate(islice(reader, start, end)):
writer.writerow(row)
except csv.Error:
print 'ERROR'
for c in row:
print len(c), c
raise
===
ERROR
7 3601867
10 birthmonth
2 10
25 2009-11-23 19:53:22.34586
Traceback (most recent call last):
File "chunk_answers_csv.py", line 69, in <module>
main()
File "chunk_answers_csv.py", line 66, in main
chunk_csv(args['CSV_PATH'], args['OUTPUT_DIR'], int(args['CHUNK_SIZE']))
File "chunk_answers_csv.py", line 48, in chunk_csv
for i, row in enumerate(islice(reader, start, end)):
_csv.Error: field larger than field limit (131072)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment