Closed Ar-Kan closed 3 years ago
thanks for the suggestion @Ar-Kan ! Can you also provide a link to the GTFS data you trying to use when you encountered this? We can take a look after we have that information at how to best add a parameter for this.
Of course @sablanchard, I thot it was irrelevant, I'm sorry. Here it is: https://dadosabertos.poa.br/dataset/gtfs
I observe that the the Python function readlines()
has worked after I (manually) added the parameter encoding='utf-8'
.
No worries! Thank you @Ar-Kan we will take a closer look at how to best expose this and will get back to you once we do.
Hi @Ar-Kan we have addressed this issue in this PR: https://github.com/UDST/urbanaccess/pull/80 can you confirm that this solves the issue for you?
Hi @sablanchard, I just checked, it is working properly, thank you for the quick response.
Description of the bug
Trying to read
utf-8
file oncp1252
system at _txt_header_whitespace_check.As far as I know, Python uses some system encoding information to read files, leading to errors like this, where it needs to pass as a parameter the correct encoding. It would be nice if we could pass it from Urbanaccess itself.
Environment
Paste the code that reproduces the issue here:
Paste the error message (if applicable):