Closed ClementHard closed 9 years ago
I get the following error as well, starting recently. This only shows up using the OpenWeatherMap Provider:
org.json.JSONException: No value for humidity
at org.json.JSONObject.get(JSONObject.java:389)
at org.json.JSONObject.getInt(JSONObject.java:478)
at com.survivingwithandroid.weather.lib.provider.openweathermap.OpenweathermapProvider.getInt(OpenweathermapProvider.java:518)
at com.survivingwithandroid.weather.lib.provider.openweathermap.OpenweathermapProvider.getCurrentCondition(OpenweathermapProvider.java:124)
at com.survivingwithandroid.weather.lib.client.okhttp.WeatherDefaultClient$4.onResponse(WeatherDefaultClient.java:380)
at com.squareup.okhttp.Call$AsyncCall.execute(Call.java:162)
at com.squareup.okhttp.internal.NamedRunnable.run(NamedRunnable.java:33)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
As suggested by @HugoGressen in #28, maybe you should use a JSON library like GSON or Jackson to parse the results. Also, is there an openweathermap change log ?
The problem i'm facing with OWM is i can't find a doc describing if a tag is mandatory or not. Anyway i will make these tags optional. Thx for you support!
I can confirm that this is causing my application to crash as well
Any plans on when going to release this fix with optional tags ?
hi, i'm having the same issue, any coming fix ?
In the master branch there is already a fix but you have to recompile the source. I'm planning to release a new version as beta in this week. Thx for your support!
Please let use know when it’s ready.
De : Surviving with android (by Francesco Azzola) [mailto:notifications@github.com] Envoyé : mercredi 14 octobre 2015 15:23 À : survivingwithandroid/WeatherLib Cc : swapps Objet : Re: [WeatherLib] getCurrentCondition JSONException: No value for deg (#32)
In the master branch there is already a fix but you have to recompile the source. I'm planning to release a new version as beta in this week. Thx for your support!
— Reply to this email directly or view it on GitHub https://github.com/survivingwithandroid/WeatherLib/issues/32#issuecomment-148047779 . https://github.com/notifications/beacon/AHqKb4MSPj0-jy5aWNFpAPpe2H1d1upnks5o7k6tgaJpZM4GAgvC.gif
The problem should b solved in 1.5.9 just released
I get the following error while using getCurrentCondition with OpenWeatherMap :