GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Getting Authorization Exception in postalCodeLookupJSON  XML
Forum Index -> Postal Codes
Author Message
tomdk



Joined: 25/02/2016 14:28:04
Messages: 1
Offline

Hi,

I am requesting the webservices via Python and I am running into some problem with postalCodeLookupJSON.

The return is {u'status': {u'message': u'Please add a username to each call in order for geonames to be able to identify the calling application and count the credits usage.', u'value': 10}}

That would make sense if there wouldn't be the user name at the end of the request. the request is:

Code:
"http://api.geonames.org/postalCodeLookupJSON?placename={s_loc}&country=FI&username={usr}".format(s_loc=loc, usr=username)
, where loc = 'Helsingin rannalla' and username...

Why am I getting the exception thrown?

Cheers, Thomas
marc



Joined: 08/12/2005 07:39:47
Messages: 4412
Offline

you get the exception because of the blanks in the placename. Please read the bullet points on the documentation:
http://www.geonames.org/export/web-services.html

Best Regards

Marc

[WWW]
 
Forum Index -> Postal Codes
Go to:   
Powered by JForum 2.1.5 © JForum Team