petewarden / dstk

A collection of the best open data sets and open-source tools for data science
http://www.datasciencetoolkit.org/
1.12k stars 186 forks source link

Python street2coordinates UnicodeDecodeError #49

Open webfanatic opened 9 years ago

webfanatic commented 9 years ago

For the address "7332 CIRCULO PAPAYO, CARLSBAD,CA 92009" I get an exception "UnicodeDecodeError: 'utf8' codec can't decode byte 0xed ...".

The stack trace points to dstk.py, line 106, in street2coordinates response = json.loads(response_string)

Adding response_string = unicode(response_string, 'latin-1') response = json.loads(response_string)

Does the trick.

I'll make a pull request.