WangDaYeeeeee / GeometricWeather

A Material Design Weather Application
GNU Lesser General Public License v3.0
2.44k stars 186 forks source link

Doesn't show weather for Sant-Peterburg in OWM #233

Open RJSDevel opened 3 years ago

RJSDevel commented 3 years ago

I found bug in owm provider, sometimes OwmOneCallResult -> Minutely -> precipitation is Float in owm, but in code is int

I don't want create merge request, may be you had fixed it in dev

papjul commented 3 years ago

Minutely precipitation does not exist in OpenWeatherMap (or rather, it is not used, it is not displayed anywhere). Where exactly is this minutely causing you issues? 🤔

RJSDevel commented 3 years ago

You can reproduce this on master - enter Санкт-Петербург, the bug doesn't allow handle information

RJSDevel commented 3 years ago

The issue has been in json converter, it expected int, but float found.

papjul commented 3 years ago

You're right, precipitation is expecting float, however, there is no precipitation in the json converter minutely, so the error is somewhere else. Please copy/paste the exact error you're having (I can't find the city atm, probably due to rate limits).

RJSDevel commented 3 years ago

I can't data had changed, yesterday was problem

RJSDevel commented 3 years ago

Try to write Saint Peterburg(Saint-Peterburg)

RJSDevel commented 3 years ago

OwmOneCallResult -> Minutely -> precipitation

papjul commented 3 years ago

Once again, precipitation is not used in minutely: https://github.com/WangDaYeeeeee/GeometricWeather/blob/master/app/src/main/java/wangdaye/com/geometricweather/weather/converters/OwmResultConverter.java#L355-L376

If you can't reproduce today, neither will I. Please let me know the exact error when you are able to reproduce, and I will do my best to fix it ;)

RJSDevel commented 3 years ago

It doesn't mean that OwmOneCallResult.Minutely doesn't deserialze by Gson The Minutely isn't equal OwmOneCallResult.Minutely

The problem occurs when OwmOneCallResult.Minutely deserialize from json

papjul commented 3 years ago

OK, you originally said the error was in the converter ;)

You mean that the API is given us a float and gson cannot convert it to int, right? I can see indeed in the API documentation that the example us shows a float ;)

You can make a pull request to have the credit for the fix in that case (you can probably do it directly from GitHub edit feature): https://github.com/WangDaYeeeeee/GeometricWeather/blob/master/app/src/main/java/wangdaye/com/geometricweather/weather/json/owm/OwmOneCallResult.java#L48

I'm not the maintainer of the app so I won't be able to merge it, but I developed the Owm service provider, so I know it won't be harmful x)

RJSDevel commented 3 years ago

Yes, you are right! It is my fault. I'll make merge request

RJSDevel commented 3 years ago

Hi! I can't make new branch for merge request - fatal: unable to access 'https://github.com/WangDaYeeeeee/GeometricWeather.git/': The requested URL returned error: 403

papjul commented 3 years ago

You need to fork the project and create the branch on your fork, you can't make a branch directly on this project.

RJSDevel commented 3 years ago

https://github.com/WangDaYeeeeee/GeometricWeather/pull/236