-
-
Notifications
You must be signed in to change notification settings - Fork 36
Open
Labels
Description
Last week (while trying to merge the fix in #386), Geonames CI builds were failing with the following error:
> [email protected] download_metadata /code/pelias/geonames
> mkdirp metadata && node bin/updateMetadata.js
internal/streams/legacy.js:59
throw er; // Unhandled stream error in pipe.
^
CsvError: Invalid Record Length: columns length is 19, got 21 on line 1
at Parser.__onRow (/code/pelias/geonames/node_modules/csv-parse/lib/index.js:701:13)
at Parser.__parse (/code/pelias/geonames/node_modules/csv-parse/lib/index.js:568:40)
at Parser._transform (/code/pelias/geonames/node_modules/csv-parse/lib/index.js:382:22)
at Parser.Transform._read (_stream_transform.js:189:10)
at Parser.Transform._write (_stream_transform.js:177:12)
at doWrite (_stream_writable.js:435:12)
at writeOrBuffer (_stream_writable.js:419:5)
at Parser.Writable.write (_stream_writable.js:309:11)
at Request.ondata (internal/streams/legacy.js:17:31)
at Request.emit (events.js:223:5) {
code: 'CSV_RECORD_DONT_MATCH_COLUMNS_LENGTH',
column: null,
empty_lines: 0,
header: false,
index: 21,
invalid_field_length: 0,
quoting: false,
lines: 1,
records: 0,
record: [
'# GeoNames.org Country Information',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
''
]
}
It looks like something changed in the http://geonames.org/export/dump/countryInfo.txt file that we weren't able to parse. It's back to normal this week, but perhaps at some point we should take a look at hardening the parsing process against unexpected input.