py-gtfs-mysql icon indicating copy to clipboard operation
py-gtfs-mysql copied to clipboard

Leading whitespace in GTFS CSVs

Open stationstops opened this issue 16 years ago • 0 comments

Some (all?) GTFS feeds have leading whitespace after the delimiter. This is really annoying because strings will have this inserted (do not ask my why it is not csv reader default), which makes for a difficult bug when testing string equality.

This is fixed by setting an option to the csv reader.

Fix: load_gtfs.py: 27 reader = csv.reader(f,skipinitialspace=True)

stationstops avatar Feb 09 '10 16:02 stationstops