Closed mmmaia closed 6 years ago
Thank you @mmmaia! Will review.
Confirming that I run into the same problem with --operator=o-6fes-empresapublicadetransportesecirculação
This PR does solve the problem for --operator=o-6fes-empresapublicadetransportesecirculação, however it introduces a new problem for other operators which don't need to be converted. For example, --operator=o-9q9-bart returns an error when it previously ran without any errors.
I'm going to close this PR and incorporate your idea into a try/except block, so that operators such as o-9q9-bart continue to work and operators which need to be converted to unicode such as o-6fes-empresapublicadetransportesecirculação work, too. Thank you for it, @mmmaia !
Thanks for the review and the new fix @willgeary
When trying to use transitflow with operators like o-6fes-empresapublicadetransportesecirculação it fails with
'ascii' codec can't encode characters in position 42-43: ordinal not in range(128)
(running on macOS Sierra Terminal Version 2.7.3)This PR converts operator name from
<type 'str'>
to<type 'unicode'>
before trying toencode
it.