Bug 331004 - Some online services (Wikipedia, earthquakes, …) failing due to geonames.org API change
Summary: Some online services (Wikipedia, earthquakes, …) failing due to geonames.org ...
Status: RESOLVED FIXED
Alias: None
Product: marble
Classification: Applications
Component: general (show other bugs)
Version: 1.6 (KDE 4.11)
Platform: Fedora RPMs Linux
: NOR major
Target Milestone: 1.7 (KDE 4.12)
Assignee: Dennis Nienhüser
URL: http://geonames.wordpress.com/2011/01...
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-11 02:55 UTC by Kevin Kofler
Modified: 2014-02-27 00:26 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 4.12.3
nienhueser: Backport+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Kofler 2014-02-11 02:55:24 UTC
Geonames now requires a &username=… parameter to its API, see:
http://www.geonames.org/export/web-services.html

This makes some plugins, e.g.: Wikipedia, earthquakes etc., fail with the following error in the description_* files in the cache:
Please add a username to each call in order for geonames to be able to identify the calling application and count the credits usage.

Reproducible: Always

Steps to Reproduce:
1. Enable the Wikipedia online service.
Actual Results:  
Nothing happens. Even moving around on the map makes nothing appear. Debugging the issue reveals the technical details mentioned above.

Expected Results:  
It just works.
Comment 1 Kevin Kofler 2014-02-11 02:58:47 UTC
According to:
http://www.geonames.org/export/#terms
they now enforce a query limit of 30000 "credits" for the free-of-charge service, which is why they require that username parameter.
Comment 2 Kevin Kofler 2014-02-11 03:10:26 UTC
And going above that 30000 credits/day limit with the commercial plans costs AT LEAST € 5.04/week (that figure is the plan with the 100000 credits/day limit, and assuming an average of only 30000 credits/day so that its 5000000 credits last 166⅔ days). The cheapest plans actually have LOWER limits than the free one! So I don't think the commercial plans are a viable option for a Free Software project like Marble.
Comment 3 Kevin Kofler 2014-02-11 03:39:26 UTC
See also: http://forum.geonames.org/gforum/posts/list/2206.page
Unathenticated access has been deprecated for almost 3 years now. It had continued working until recently, but now it got dropped.
Comment 5 Kevin Kofler 2014-02-11 03:48:51 UTC
For the Wikipedia one, wikilocation.org might be an alternative if the query limit on geonames.org is a problem. For the other stuff, I don't know.
Comment 6 Dennis Nienhüser 2014-02-26 21:18:33 UTC
Thanks for researching this, Kevin. I'll commit a fix shortly to have it work again with the free API.

wikilocation.org looks interesting. We should look into it as a possible alternative for the wikipedia plugin.
Comment 7 Dennis Nienhüser 2014-02-26 21:20:08 UTC
Git commit 12a1f748dedb75b20ae9e1b1bb6020be0a4f3a2f by Dennis Nienhüser.
Committed on 26/02/2014 at 21:03.
Pushed by nienhueser into branch 'master'.

Fix geonames based online services after API change

Affects Wikipedia, weather, postal codes and earthquakes services.

M  +1    -0    src/plugins/render/earthquake/EarthquakeModel.cpp
M  +2    -0    src/plugins/render/postalcode/PostalCodeModel.cpp
M  +4    -0    src/plugins/render/weather/GeoNamesWeatherService.cpp
M  +2    -0    src/plugins/render/wikipedia/WikipediaModel.cpp

http://commits.kde.org/marble/12a1f748dedb75b20ae9e1b1bb6020be0a4f3a2f
Comment 8 Dennis Nienhüser 2014-02-26 21:23:04 UTC
Git commit f23aaea5812dbdfce26d3134a56d2dabc8967fd6 by Dennis Nienhüser.
Committed on 26/02/2014 at 21:03.
Pushed by nienhueser into branch 'KDE/4.12'.

Fix geonames based online services after API change

Affects Wikipedia, weather, postal codes and earthquakes services.
FIXED-IN: 4.12.2
(cherry picked from commit 12a1f748dedb75b20ae9e1b1bb6020be0a4f3a2f)

M  +1    -0    src/plugins/render/earthquake/EarthquakeModel.cpp
M  +2    -0    src/plugins/render/postalcode/PostalCodeModel.cpp
M  +4    -0    src/plugins/render/weather/GeoNamesWeatherService.cpp
M  +2    -0    src/plugins/render/wikipedia/WikipediaModel.cpp

http://commits.kde.org/marble/f23aaea5812dbdfce26d3134a56d2dabc8967fd6
Comment 9 Kevin Kofler 2014-02-27 00:26:31 UTC
4.12.2 is already released, the fix will be only in 4.12.3.