gabrielflorit / file-geocoder

Geocodes a file (JSON or CSV). Requires a Google-style geocoder.
MIT License
24 stars 3 forks source link

Alternative to maps.googleapis.com fails to work #8

Closed grabbeh closed 10 years ago

grabbeh commented 10 years ago

According to http://www.datasciencetoolkit.org/developerdocs#googlestylegeocoder the geocoder they offer should mirror Google's geocoder.

However when I replace 'maps.googleapis.com' with 'www.datasciencetoolkit.org' although import takes place, the below error is thrown.

I realise this may not be an issue with file-geocoder and in reality file-geocoder relies on the geocoder module, but I thought I would mention the issue all the same because as far as I can tell, the simple replacement of the URL should work fine. In truth, using geocoder on its own and replacing the Gmaps URL with the datascience url throws an error which suggests the underlying issue may be with datasciencetoolkit:

:/var/www/thisorthat# file-geocoder -f city.json -a address -h www.datasciencetoolkit.org -p 80 -s 1
Importing 3,001 records into city.db... done.

Processing:                                                  
        0.03%       1/3,001 records
        Elapsed: 0h 0m 0s
undefined:1
<h1>Internal Server Error</h1>
^
SyntaxError: Unexpected token <
    at Object.parse (native)
    at IncomingMessage.<anonymous> (/usr/lib/node_modules/file-geocoder/node_modules/geocoder/index.js:41:21)
    at IncomingMessage.EventEmitter.emit (events.js:117:20)
    at _stream_readable.js:910:16
    at process._tickCallback (node.js:415:13)

PS. Thank you for making file-geocoder and making it available for general usage.

grabbeh commented 10 years ago

Apologies - after digging into this further I realise this is an issue with datasciencetoolkit rather than file-geocoder as detailed at https://groups.google.com/forum/#!topic/dstk-users/lTZ4pxCPM-A