Comments (7)
Could you provide some information on how to recreate this? What city/coordinate/etc are you getting data for? Are you using an API key? A small code sample would help diagnose this.
I believe I know what the issue is, so I'll go ahead and mark this as a bug.
from czweatherkit.
Yes, I am using an API Key. And this doesn't happen always. It just happened a few times now.
CZWeatherRequest *request = [CZWeatherRequest requestWithType:CZCurrentConditionsRequestType];
request.location = [CZWeatherLocation locationWithCLLocationCoordinate2D:place.coordinate ];
request.service = [CZOpenWeatherMapService serviceWithKey:@"XXXXXXXXX"];
LogDebug(@"WEATHERREQUEST STARTED");
if (timeOut == NULL) {
timeOut = [NSTimer scheduledTimerWithTimeInterval: 3
target: self
selector: @selector(cancelURLConnection:)
userInfo: nil
repeats: NO];
//[timeOut retain];
}
[request performRequestWithHandler:^(id data, NSError *error) {
if (data) {
[timeOut invalidate];
LogDebug(@"WEATHERREQUEST DATA RETRIEVED");
from czweatherkit.
What's the value of place.coordinate
when it fails?
I'm guessing OpenWeatherMap's response contains "main": null
in its response even when it doesn't have data for the given coordinate. If you see line 145 in OpenWeatherMapService.m then it makes sense why this is failing; JSON[@"main"]
is returning NSNull
and then we're trying to use the NSNull
as a dictionary. I'll read up on their API to make sure this is what's happening.
from czweatherkit.
I added a check with CLLocationCoordinate2DIsValid and will test again.
from czweatherkit.
I'm currently working on an update to fix this issue. Just wanted to let you know.
from czweatherkit.
Great! Thanks
from czweatherkit.
Alright, I think this is resolved in the new release. I'll go ahead and close this issue, but please open it again if you find any issues. Thanks.
from czweatherkit.
Related Issues (20)
- ClimaconCharacter change with Language HOT 6
- CZForecastRequestType doesn't return data HOT 2
- CZWeatherKit does not support historical data HOT 4
- Problem with WatchKit integration HOT 2
- Add support for WorldWeatherOnline in v2.0
- CZOpenWeatherMapRequest with location HOT 3
- windspeed missing in the CurrentForecastCondition HOT 3
- low and high temperature missing in Current Weather HOT 2
- Add windSpeed to CZWeatherForecastCondition HOT 1
- Use venmo/slather for test coverage reports and hook into travis-ci
- days property's value becomes 0 after CZWeatherRequest is copied HOT 3
- Shouldn't it be CZOpenWeatherMapRequest in your example HOT 1
- Support for polling individual weather stations on WUnderground? HOT 1
- Duplicate case value: 'ClimaconFahrenheit' and 'ClimaconShowers' both equal '39' HOT 2
- Can you add tvos support to the podspec so tvos apps can use it? HOT 5
- 2.2.3 doesn't work (same code works on 2.2.1) HOT 4
- Crash when archiving CZWeatherCurrentCondition, CZWeatherForecastCondition, CZWeatherHourlyCondition & CZWeatherLocation HOT 2
- Climacons not displaying in UILabel HOT 7
- Add minTemp and maxTemp to CurrentWeatherCondition HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from czweatherkit.