MIERUNE / gtfs-parser

parse and aggregate GTFS
https://pypi.org/project/gtfs-parser/
MIT License
7 stars 1 forks source link

Skip unused files to avoid errors #12

Closed takohei closed 3 months ago

takohei commented 4 months ago

If an error occurs when reading a file other than the required table, the program terminates abnormally.

Example

GTFS of Nanto city has a SJIS encoded file named "result.csv". I consider that the result of the mail detoxification was archived incorrectly.

"gtfs_parser\gtfs_parser\gtfs.py", line 12, in load_df
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x90 in position 0: invalid start byte

Proposal

I propose that GTFSFactory only read files that are actually used by this tool.

Currently, the GTFS specification has been extended and many files are defined that this tool does not use. This will improve the performance.