TwitchAudio.com (@swiftyspiffy/TwitchAudio.com), Shazam-like service for identifying song names, artists, and youtube/spotify links for songs playing on Twitch streams and clips
BurkeBlack / TheLateShift, lead developer for Twitch streamer BurkeBlack and Twitch community TheLateShift. Develop websites, bots, moderation tools, metrics aggregators, VOD exporters, etc.
System.NullReferenceException: Object Reference not set to an instance of an object at OpenWeatherAPI.Sys.cs line 21
Line 21:
if (sysData.SelectToken("type") != null)
Type = int.Parse(sysData.SelectToken("type").ToString());
Notes:
Commenting lines 19-31 on Sys.cs and Line 61 in query.cs seems to correct the problem.
sys.cs /*
public Sys(JToken sysData)
{
if (sysData.SelectToken("type") != null)
Type = int.Parse(sysData.SelectToken("type").ToString());
if (sysData.SelectToken("id") != null)
ID = int.Parse(sysData.SelectToken("id").ToString());
Message = double.Parse(sysData.SelectToken("message").ToString());
Country = sysData.SelectToken("country").ToString();
Sunrise = convertUnixToDateTime(double.Parse(sysData.SelectToken("sunrise").ToString()));
Sunset = convertUnixToDateTime(double.Parse(sysData.SelectToken("sunset").ToString()));
}
*/
query.cs //sys = new Sys(jsonData.SelectToken("sys"));
I am honestly hoping it is just a bug in your software. I put the temp to faren. But it was saying it was 300 out. I put it to kelvin and it says the temp of outside. I live in ks and it is pretty hot out. So my thermometer told me 87. So when i discovered that faren is not faren and kelvin displays faren. I was hoping its just a bug in your software.
Somehow this code seems to use the users decimal separator (in my case a comma) and thus ignoreing the . (US & as far as i know part of the JSON's standard).
Result is wind speeds are 1000 fold of what they are in the data retrieved
"speed": 11.32 thus results in the demo printing 1132 m/s/
I'm using this library for a cross-platform scenario running, amongst others, on iOS. These platforms force you to use secure endpoints. It seems there are also https endpoints available for Open Weather Map so it would be great to have the ability to use https.