NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 89 90 91 92 93 Next »
New weather plugin alpha

 
  • 0 Vote(s) - 0 Average
New weather plugin alpha
bs007
Offline

Junior Member

Posts: 27
Threads: 4
Joined: Apr 2004
#51
2004-04-14, 02:24 PM
Sub suggested to me to delete a part of the config.xml and that solved my 'Celsius' problem. I had probably messed up my config.xml when installing the new weather app. So I'm pretty sure the error was only in my configuration and not in gb-pvr or the new weather plugin.
Good luck with your new job, CodeMonkey!
sisuomin
Offline

Junior Member

Posts: 15
Threads: 3
Joined: Jan 2004
#52
2004-04-14, 08:41 PM
[b Wrote:Quote[/b] (sub @ April 13 2004,19:06)]sisuomin, you dont have a firewall or similar that could be blocking the access out to msnbc.com website?
My problem is somehow related to regional settings. If I set locale to Finnish (control panel -> regional options) I get an error. With English it works ok.
CodeMonkey
Offline

Senior Member

Posts: 389
Threads: 86
Joined: Apr 2004
#53
2004-04-14, 10:32 PM
[b Wrote:Quote[/b] (sisuomin @ April 14 2004,15:41)]My problem is somehow related to regional settings. If I set locale to Finnish (control panel -> regional options) I get an error. With English it works ok.
When you say 'I get an error' is that when you press the weather button in the weather plugin or when trying to set it in the config dialog?
-CodeMonkey
sisuomin
Offline

Junior Member

Posts: 15
Threads: 3
Joined: Jan 2004
#54
2004-04-15, 06:05 PM
Error appears when weather button is pressed. Configuration works ok.
CodeMonkey
Offline

Senior Member

Posts: 389
Threads: 86
Joined: Apr 2004
#55
2004-04-16, 01:52 AM
Sub maybe you can have a look.  I added the log command here in DownloadWeatherInformation:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">
System.Uri uri = new System.Uri(weatherURL);
WebRequest request = WebRequest.Create(uri);
WebResponse response = request.GetResponse();
StreamReader streamReader = new StreamReader(response.GetResponseStream());

string weatherSummaryText = streamReader.ReadToEnd();

Logger.Verbose(weatherSummaryText);

// parse information out of summary text
[/QUOTE]

When the US locale is selected here is that part of the log:

4/15/2004 8:22:05 PM.777 VERBOSE [2] Rendering HomeMenu
4/15/2004 8:22:06 PM.618 VERBOSE [2]
function makeWeatherObj() {

this.swCity = &quot;Honeoye Falls&quot;;
this.swSubDiv = &quot;NY&quot;;
this.swCountry = &quot;USA&quot;;
this.swRegion = &quot;United States&quot;;
this.swTemp = &quot;50&quot;;
this.swTempCel = Math.round((5/9)*(this.swTemp-32));
this.swCIcon = &quot;30&quot;;
this.swWindS = &quot;6&quot;;
this.swWindD = &quot;NNW&quot;;
this.swBaro = &quot;30.23&quot;;
this.swHumid = &quot;29&quot;;
this.swReal = &quot;50&quot;;
this.swUV = &quot;0&quot;;
this.swVis = &quot;10.00&quot;;
this.swLastUp = &quot;04/15/2004 17:54:00&quot;;
this.swConText = &quot;Partly Cloudy&quot;;
this.swFore = &quot;6|7|1|2|3|04/16/2004|04/17/2004|04/18/2004|04/19/2004|04/20/2004|34|37|30|28|30|22|27|26|3|26|63|69|74|75|57|20|30|20|30|20|29|26|29|11|29|4|1|4|14|4|48|54|57|44|34|&quot;;

this.swAcid = &quot;14472&quot;;
}
4/15/2004 8:22:11 PM.635 VERBOSE [2] Rendering HomeMenu
4/15/2004 8:22:13 PM.548 VERBOSE [2] Rendering HomeMenu

and when I select the Finnish locale:

15.4.2004 20:06:11.575 VERBOSE [2] Rendering HomeMenu
15.4.2004 20:06:12.676 VERBOSE [2] Rendering HomeMenu
15.4.2004 20:06:13.508 VERBOSE [2]
function makeWeatherObj() {

this.swCity = &quot;Honeoye Falls&quot;;
this.swSubDiv = &quot;NY&quot;;
this.swCountry = &quot;USA&quot;;
this.swRegion = &quot;United States&quot;;
this.swTemp = &quot;50&quot;;
this.swTempCel = Math.round((5/9)*(this.swTemp-32));
this.swCIcon = &quot;30&quot;;
this.swWindS = &quot;6&quot;;
this.swWindD = &quot;NNW&quot;;
this.swBaro = &quot;30.23&quot;;
this.swHumid = &quot;29&quot;;
this.swReal = &quot;50&quot;;
this.swUV = &quot;0&quot;;
this.swVis = &quot;10.00&quot;;
this.swLastUp = &quot;04/15/2004 17:54:00&quot;;
this.swConText = &quot;Partly Cloudy&quot;;
this.swFore = &quot;6|7|1|2|3|04/16/2004|04/17/2004|04/18/2004|04/19/2004|04/20/2004|34|37|30|28|30|22|27|26|3|26|63|69|74|75|57|20|30|20|30|20|29|26|29|11|29|4|1|4|14|4|48|54|57|44|34|&quot;;

this.swAcid = &quot;14472&quot;;
}
15.4.2004 20:06:14.219 ERROR [2] Error: msg=0x202 (WM_LBUTTONUP) hwnd=0x80336 wparam=0x0 lparam=0x15100b5 result=0x0   :  Input string was not in a correct format.   :     at System.Number.ParseSingle(String s, NumberStyles style, NumberFormatInfo info)
  at System.Single.Parse(String s, NumberStyles style, IFormatProvider provider)
  at WeatherPlugin.WeatherTask.CurrentConditions()
  at WeatherPlugin.WeatherTask.render(Boolean&amp; requiresMoreRendering)
  at ac.f(Object A_0, EventArgs A_1)
  at System.Windows.Forms.Control.OnClick(EventArgs e)
  at System.Windows.Forms.Control.WmMouseUp(Message&amp; m, MouseButtons button, Int32 clicks)
  at System.Windows.Forms.Control.WndProc(Message&amp; m)
  at System.Windows.Forms.ScrollableControl.WndProc(Message&amp; m)
  at System.Windows.Forms.ContainerControl.WndProc(Message&amp; m)
  at System.Windows.Forms.Form.WndProc(Message&amp; m)
  at ac.a(Message&amp; A_0)
15.4.2004 20:06:14.219 VERBOSE [2] Rendering HomeMenu
15.4.2004 20:06:16.702 VERBOSE [2] Rendering HomeMenu
15.4.2004 20:06:17.944 VERBOSE [2] Rendering HomeMenu
15.4.2004 20:06:18.154 VERBOSE [2] SourceConfigurationContainer.LoadAll()
15.4.2004 20:06:18.174 VERBOSE [2] Loading DirectRecordingSource Configuration : 1
15.4.2004 20:06:18.194 VERBOSE [2] Loading XMLTV Configuration : 1
15.4.2004 20:06:18.234 VERBOSE [2] About to connect to remote recording service
15.4.2004 20:06:18.274 VERBOSE [2] getValue() loading new key/value into cache: /settings/AutoCreateFolders
15.4.2004 20:06:18.274 VERBOSE [2] getValue: /settings/AutoCreateFolders : true

Does this failure make any sense to you?  That error message is not generated by the weather plugin.
-CodeMonkey
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,686
Threads: 767
Joined: Nov 2003
#56
2004-04-16, 01:57 AM
Can you email the code for the WeatherTask.CurrentConditions() function? Send it to me at support@devnz.com
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,686
Threads: 767
Joined: Nov 2003
#57
2004-04-16, 02:03 AM
I suspect its a problem parsing one of the numeric fields that contain a decimal point.

sisuomin, does the Finnish locale use comma's instead of decimal points?
CodeMonkey
Offline

Senior Member

Posts: 389
Threads: 86
Joined: Apr 2004
#58
2004-04-16, 02:27 AM
I believe it does, sub.   You have mail.

It makes sense too. Your example, which runs fine in the finnish locale, doesn't parse any real numbers.
-CodeMonkey
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,686
Threads: 767
Joined: Nov 2003
#59
2004-04-16, 02:45 AM
The microsoft online-help indicates that the float and double.parse() methods parse a culture-specific decimal point symbol, so this likely to be the problem.

Use the form of Double.Parse which takes an IFormatProvider, and give
it CultureInfo.InvariantCulture, eg:

double d = Double.Parse (myString, CultureInfo.InvariantCulture);
CodeMonkey
Offline

Senior Member

Posts: 389
Threads: 86
Joined: Apr 2004
#60
2004-04-16, 09:45 AM
Yup, that fixed it. Thanks sub.

It will be in the next weather release.
-CodeMonkey
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (6): « Previous 1 2 3 4 5 6


Possibly Related Threads…
Thread Author Replies Views Last Post
  PIP plugin for Kodi sgilani 2 2,825 2022-10-17, 12:44 AM
Last Post: sgilani
  New Systems Plugin kirschey 10 3,350 2020-11-14, 08:01 PM
Last Post: sub
  VIdeo playback from plugin mvallevand 5 3,460 2015-08-06, 10:43 PM
Last Post: sub
  Attention Sub: Open TV / Custom Data Grabber plugin Benoire 2 2,906 2014-11-14, 02:05 AM
Last Post: Benoire
  API docs to help with plugin development? McBainUK 3 2,771 2013-06-08, 06:14 PM
Last Post: sub
  Refreshing TV Guide Data (after System plugin EPG update) imilne 13 6,096 2013-03-24, 08:03 PM
Last Post: imilne
  sabnzbd plugin to show processed files Wakalaka 1 1,950 2013-03-12, 06:48 AM
Last Post: psycik
  Plugin problems with started from the command line mvallevand 11 4,994 2012-08-12, 07:56 PM
Last Post: sub
  Get NextPVR data directory from outside a plugin McBainUK 3 2,244 2012-02-11, 05:42 PM
Last Post: mvallevand
  Weather Plugin imilne 0 1,432 2012-01-15, 08:33 PM
Last Post: imilne

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode