UDST/urbanaccess

Read in txt files as txt files, rather than deal with encoding errors

kuanb opened this issue · 1 comments

kuanb commented

As per our discussion IRL (w/ Sam at Maptime), we observed that this line (

if raw.startswith(codecs.BOM_UTF8):
) and the corresponding actions if true are designed to deal with GTFS zip files stores as .txt rather than .csv.

Alternately, just read in the csv with file type set as txt. Check the file type via something like foo.lower().endswith('.txt') and then, if true, then go ahead and read in as a text file.

Thanks Kuan. Can address this at a later time.