UDST / urbanaccess

A tool for GTFS transit and OSM pedestrian network accessibility analysis by UrbanSim
https://udst.github.io/urbanaccess/index.html
GNU Affero General Public License v3.0
236 stars 56 forks source link

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

Open kuanb opened 7 years ago

kuanb commented 7 years ago

As per our discussion IRL (w/ Sam at Maptime), we observed that this line (https://github.com/UDST/urbanaccess/blob/2f37f8ea8337fd65d654e9506b3c76f753af22db/urbanaccess/gtfs/load.py#L59) 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.

sablanchard commented 7 years ago

Thanks Kuan. Can address this at a later time.