geocoder icon indicating copy to clipboard operation
geocoder copied to clipboard

ERROR - 401 Client Error: Unauthorized for url

Open gmmaio94 opened this issue 4 years ago • 4 comments

Hi There,

I have recently registered on www.geonames.org and obtained a username (henceforth USERNAME) as a result.

I run this query using the python geocoder package : g = geocoder.geonames('Belarus', maxRows=100, key='USERNAME', featureClass='MUS') result = ([(g.lat, g.lng, g.address, g.description, g.class_description) for r in g])

I got this error:

Status code 401 from http://api.geonames.org/searchJSON: ERROR - 401 Client Error: Unauthorized for url: http://api.geonames.org/searchJSON?q=Belarus&fuzzy=1.0&username=USERNAME&maxRows=100&featureClass=MUS

According to this blogpost http://forum.geonames.org/gforum/posts/list/35472.page, it may be a server issues as it may take some time for all servers to sync new accounts.

Is this still the case in my situation ? How long will it take for the servers to sync my newly created account ?

Thanks very much, G.

gmmaio94 avatar Mar 17 '20 12:03 gmmaio94

Hi, I would like to second this issue. I just created an account today, how long will it take for servers to sync? Thank you!

piperwolters avatar Aug 17 '22 01:08 piperwolters

Same here! Will try again later this evening.

MonikaBarget avatar Jan 23 '23 15:01 MonikaBarget

How long did it take?

Steffanic avatar Nov 02 '23 15:11 Steffanic

Actually, it turned out to be an issue with the activation link in my case. I have described the process of using the Geonames API in Python here: https://monikabarget.github.io/GeoHumTutorials/Tutorial_geocodingGEONAMES

MonikaBarget avatar Nov 02 '23 16:11 MonikaBarget