Electricitymap-contrib: Decoding error in JP price parser

Created on 28 Aug 2018  路  2Comments  路  Source: tmrowco/electricitymap-contrib

JP.fetch_price is failing due to a UnicodeDecodeError in pandas.read_csv, the CSV file contains Japanese characters. I don't get this issue locally and saw it for the first time on the Kibana logs.

Maybe it's as simple as passing an encoding parameter to pandas.read_csv. But I'm using the same version of pandas that's specified in the requirements.txt file, so maybe that's not it. I can't replicate the issue locally. Any ideas?

bug 馃悶 parser

Most helpful comment

I was able to replicate the UnicodeDecodeError on my other Debian installation. Giving read_csv encoding='shift-jis' seemed to have fixed it. Sorry, I can't debug the locale/encoding settings more right now.

All 2 comments

Hmm maybe. @maxbellec any ideas?

I was able to replicate the UnicodeDecodeError on my other Debian installation. Giving read_csv encoding='shift-jis' seemed to have fixed it. Sorry, I can't debug the locale/encoding settings more right now.

Was this page helpful?
0 / 5 - 0 ratings