Closed andyeff closed 5 years ago
The issue here is the wunderground API is returning some latin-1 encoded characters in the data. That's not really expected by python's json parser.
I put in a bit of a hack to try and handle that by converting to unicode from latin-1.
I'm having problems figuring out how best to address the issue of Wunderground returning data that triggers a UnicodeDecodeError. The swedish town of 'umea' seems to be a good test case.
".we umea" triggers the following traceback:
Unicode still confuses me and makes me question my purpose in the universe, so I don't know whether this is an issue with the JSON that wunderground returns, or whether the get_json function just doesn't like dealing with non-ASCII. I wouldn't mind trying to fix it myself and putting in a pull request, but I'm really unsure about how to edit rmmh's existing url-parsing functions without breaking everything. Anyone got a suggestion where I should start?