Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
kuanb opened this issue May 17, 2017 · 1 comment
Open

Comments

@kuanb
Copy link
Member

kuanb commented May 17, 2017

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.

@sablanchard
Copy link
Contributor

Thanks Kuan. Can address this at a later time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants