View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 72 posts ] 
Go to page 1, 2, 3, 4, 5  Next

Print view Previous topic   Next topic  
Author Message
Search for:
 Post subject: Mythweather errors
PostPosted: Thu Apr 12, 2007 6:19 pm 
Offline
Joined: Sun Sep 25, 2005 3:50 pm
Posts: 1013
Location: Los Angeles
For some inexplicable reason, my mythweather does not work from mythweb anymore. It was working fine yesterday, but today... nada. When I select mythweather from the icon in the upper center of the mythweb home page, I get the following errors printed at the top of the screen and my current conditions are "unknown" and forecast is blank. Interestingly, the radar map seems correct.

Quote:
Error at /usr/share/mythtv/mythweb/modules/weather/handler.php, line 96:
file() [function.file]: HTTP request failed! HTTP/1.1 404 NotFound

Error at /usr/share/mythtv/mythweb/modules/weather/handler.php, line 96:
file(http://www.msnbc.com/m/chnk/d/weather_d ... d=USCA0638) [function.file]: failed to open stream: Success

Error at /usr/share/mythtv/mythweb/modules/weather/handler.php, line 98:
Invalid argument supplied for foreach()


Anyone have any ideas? I have not changed anything, but I do not know if it works properly from the frontend as I'm not home. Looks like MSNBC changed their website. I thinkered with the handler.php file a little, but have yet to make any real headway.

_________________
Mike
My Hardware Profile


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 12, 2007 6:25 pm 
Offline
Joined: Fri Nov 18, 2005 9:22 am
Posts: 777
Location: spencerport, ny (USA)
Same here. I've been noticing some errors lately, with "no information" or some such for certain days. Then today, bomb.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 12, 2007 9:07 pm 
Offline
Joined: Wed Nov 16, 2005 8:55 pm
Posts: 1381
Location: Farmington, MI USA
Ditto here. I hadn't used Mythweather in about a week, but just checked and have no data except the radar seems OK. I'm guessing mihanson is spot on with MSNBC changing their site.


Top
 Profile  
 
 Post subject: Re: Mythweather errors
PostPosted: Fri Apr 13, 2007 4:07 am 
Offline
Joined: Tue May 16, 2006 8:41 am
Posts: 47
Location: United Kingdom
mihanson wrote:
For some inexplicable reason, my mythweather does not work from mythweb anymore. It was working fine yesterday, but today... nada. When I select mythweather from the icon in the upper center of the mythweb home page, I get the following errors printed at the top of the screen and my current conditions are "unknown" and forecast is blank. Interestingly, the radar map seems correct.

..snip..
mihanson wrote:
Anyone have any ideas? I have not changed anything, but I do not know if it works properly from the frontend as I'm not home. Looks like MSNBC changed their website. I thinkered with the handler.php file a little, but have yet to make any real headway.

slowtolearn wrote:
Ditto here. I hadn't used Mythweather in about a week, but just checked and have no data except the radar seems OK. I'm guessing mihanson is spot on with MSNBC changing their site.

Looks like something has changed with MSNBC.com (again - Google threw up some references to problems last August). From MythTV's Installing and using MythTV: MythWeather page:
Quote:
MythWeather uses MSNBC.com as its source for weather data and weather.com for its radar image.

This would explain why radar images are available via both MythWeb and the Information Centre but current conditions, extended forecast, and tomorrow's outlook are not working.

Simon


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 13, 2007 8:47 am 
Offline
Joined: Mon Apr 10, 2006 3:48 pm
Posts: 997
Location: Lexington, Ky
Same thing here no data since Monday. And I though it was something that I did! Sounds like it's a provider problem.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 13, 2007 9:13 am 
Offline
Joined: Tue May 16, 2006 8:41 am
Posts: 47
Location: United Kingdom
tscholl wrote:
Sounds like it's a provider problem.


It looks like the URL that both MythWeb and MythWeather use http://www.msnbc.com/m/chnk/d/weather_d_src.asp?acid=UKXX0028 (replace UKXX0028 with your weather location ID) is broken (it's now giving a Page not found error).

You can find this URL by
Code:
# grep msnbc /usr/share/mythtv/mythweb/modules/weather/handler.php

Looking at the source for the MythWeather plugin (http://svn.mythtv.org/trac/browser/trunk/mythplugins/mythweather/mythweather/weather.cpp) the same MSNBC URL is hardcoded in there too (line 2382).

I've found a reference via Google to a different URL http://weather.msn.com/weatherdata.aspx?src=msn_wx&wealocations=wc:UKXX0028&culture=en-us (again change UKXX0028 to suit your location) but it doesn't appear to provide the same information - MythWeb/MythWeather look for the string this.swLastUp but this isn't present and I believe the information returned is different anyway.

Now whether it's permanently broken or not we can only hope it's the latter. I haven't found any reference to this recent problem on other lists though!

Simon

Edit: MSNBC URL is now producing an error rather than blank page


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 13, 2007 1:46 pm 
Offline
Joined: Tue May 16, 2006 8:41 am
Posts: 47
Location: United Kingdom
simonflood wrote:
Now whether it's permanently broken or not we can only hope it's the latter. I haven't found any reference to this recent problem on other lists though!

It looks like this might be a permanent change by Microsoft since the URL now gives an error page.

However it seems that it might be possible to fake up a suitable web response as someone has done this in order to get better and more reliable weather information from Environment Canada for Canadian users.

See this archived posting to the mythtv-dev mailing list for details.

I'm thinking that we could use the same process to either pull the data from the new style MSNBC web site or perhaps switch to something else like The Weather Channel (weather.com) or BBC ... ?

In the longer term it looks like mythweather-revamp is the future except that it's currently US only. See also Weather sandbox on the MythTV Wiki.

Simon


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 13, 2007 1:49 pm 
Offline
Joined: Sun Sep 25, 2005 3:50 pm
Posts: 1013
Location: Los Angeles
I just posted this issue on the mythtv-users mailing list. We'll see what comes of it.

_________________
Mike
My Hardware Profile


Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 14, 2007 11:23 am 
Offline
Joined: Sun Sep 25, 2005 3:50 pm
Posts: 1013
Location: Los Angeles
Someone else already has a ticket in on this. See http://svn.mythtv.org/trac/ticket/3303

_________________
Mike
My Hardware Profile


Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 21, 2007 8:35 am 
Offline
Joined: Tue Sep 26, 2006 1:08 pm
Posts: 5
Ticket 3303 was initially opened for an issue with weather in MythWeb.

A new ticket has been created with a the patches attached.

You can find it here:

http://svn.mythtv.org/trac/ticket/3327


Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 21, 2007 8:41 am 
Offline
Joined: Tue Sep 26, 2006 1:08 pm
Posts: 5
I'm using R5D1 and I just tried installing the patch withouth success.

I don't really know the ins and outs of knoppmyth yet, but it looks like the patch is looking for /mythplugins-orig/mythweather/mythweather/Makefile

Does KM include the source for the Myth plugins?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Apr 22, 2007 11:25 pm 
Offline
Joined: Tue Nov 28, 2006 3:38 am
Posts: 82
Location: Kangasala, Finland
Since my only experience in Linux in KnoppMyth, I'm a wee bit lost applying this patch. Could someone please post detailed instructions for me (and propably many more) noob's on how to get this working?

_________________
Jari-Matti

MBE&FE: GeForce MX440, Athlon XP 2000+, MSI KT333 Ultra, onboard audio, 512 MB, 2 x Technotrend T1500 DVB-T, LiteOn DVD±RW 16x DW1650-488C, Seagate 250 GB
FE: 1500MHz Geforce MX200-V, int. audio, 256MB


Top
 Profile  
 
PostPosted: Mon Apr 23, 2007 3:23 am 
Offline
Joined: Tue May 16, 2006 8:41 am
Posts: 47
Location: United Kingdom
auttila wrote:
Could someone please post detailed instructions for me (and propably many more) noob's on how to get this working?


Since I've been providing some input with SVN ticket 3303 I guess I'm in as good a position as anyone to help out.

Here's are the steps that I followed to fix MythWeb's weather module in KnoppMyth R5E50 so that it works with weather.com. Since KM doesn't come with the latest code I pull some updated PHP scripts (there are others, not sure if they're required).
Code:
# cd /usr/share/mythtv/mythweb/modules/weather/
# mv handler.php handler.php.orig
# wget http://svn.mythtv.org/trac/export/13313/trunk/mythplugins/mythweb/modules/weather/handler.php
# mkdir -p includes/objects
# cd includes/objects
# wget http://svn.mythtv.org/trac/export/13313/trunk/mythplugins/mythweb/modules/weather/includes/objects/Forecast.php
# wget http://svn.mythtv.org/trac/export/13313/trunk/mythplugins/mythweb/modules/weather/includes/objects/WeatherSite.php
# cd /usr/share/mythtv/mythweb/modules/weather/tmpl/default/
# mv weather.php weather.php.orig
# wget http://svn.mythtv.org/trac/export/13313/trunk/mythplugins/mythweb/modules/weather/tmpl/default/weather.php
# cd /usr/share/mythtv/mythweb/modules/
# wget http://svn.mythtv.org/trac/raw-attachment/ticket/3303/weather.3.patch
# patch -p1 < weather.3.patch
# cd /tmp/
# wget http://svn.mythtv.org/trac/raw-attachment/ticket/3303/icons1.zip
# wget http://svn.mythtv.org/trac/raw-attachment/ticket/3303/icons2.zip
# wget http://svn.mythtv.org/trac/raw-attachment/ticket/3303/icons3.zip
# wget http://svn.mythtv.org/trac/raw-attachment/ticket/3303/icons4.zip
# unzip icons\?.zip -d /usr/share/mythtv/mythweb/skins/default/img/weather/
# unzip icons\?.zip -d /usr/share/mythtv/mythweb/skins/grey/img/weather/

Note that the end result is not perfect but at least it works. Things that could/should be improved are the retrieval of data from weather.com (it doesn't quite conform to their directions - no data is cached) and layout of the web pages themselves (logo placement).

I haven't yet taken a look at fixing MythWeather itself but will do so. If I get it working and no-one else has posted a HowTo I'll then do so.

HTH

Simon


Top
 Profile  
 
PostPosted: Mon Apr 23, 2007 4:41 am 
Offline
Joined: Tue May 16, 2006 8:41 am
Posts: 47
Location: United Kingdom
simonflood wrote:
I haven't yet taken a look at fixing MythWeather itself but will do so. If I get it working and no-one else has posted a HowTo I'll then do so.


Guess I'm the first to work this through!?

OK here's how to fix MythWeather itself (again KnoppMyth RE50) so that it works with weather.com.

Download latest version of MythWeather
Code:
# cd /tmp/
# mkdir mythweather
# cd mythweather
# wget http://svn.mythtv.org/trac/export/13313/trunk/mythplugins/mythweather/mythweather/main.cpp
# wget http://svn.mythtv.org/trac/export/13313/trunk/mythplugins/mythweather/mythweather/mythweather.pro
# wget http://svn.mythtv.org/trac/export/13313/trunk/mythplugins/mythweather/mythweather/weather.cpp
# wget http://svn.mythtv.org/trac/export/13313/trunk/mythplugins/mythweather/mythweather/weather.h

Auto-create the Makefile
Code:
# qmake

Download patch file & images from SVN ticket 3327
Code:
# wget http://svn.mythtv.org/trac/raw-attachment/ticket/3327/mythweather3.patch
# wget http://svn.mythtv.org/trac/raw-attachment/ticket/3327/icons1.zip
# wget http://svn.mythtv.org/trac/raw-attachment/ticket/3327/icons2.zip
# wget http://svn.mythtv.org/trac/raw-attachment/ticket/3327/icons3.zip
# wget http://svn.mythtv.org/trac/raw-attachment/ticket/3327/icons4.zip

Apply patch - you'll get 2 errors (Hunk #1 FAILED at 187, Hunk #2 FAILED at 260, 2 out of 2 hunks FAILED ...) which can be safely ignored (they relate to copying some images which we'll do by hand)
Code:
# patch < mythweather3.patch

Create & install new MythWeather module
Code:
# make
# cp libmythweather.so /usr/lib/mythtv/plugins/

Copy required images
Code:
# unzip icons\?.zip -d /usr/share/mythtv/themes/default

Reboot to bring new MythWeather module into play - instead of rebooting there may another of way of using the new version but it works for me!
Code:
# reboot

If you hadn't already been using a later version of the MythWeather plugin (from SVN) you'll find that you've now got a few more screens of weather info.

HTH

Simon

Edited to reflect availability of mythweather2.patch that removes need to edit patch file (though will still get errors but they can be ignored)
Further edited to reflect availability of mythweather3.patch to fix wind speed in forecast (Thanks Kirk!)


Last edited by simonflood on Fri Jun 22, 2007 3:18 am, edited 4 times in total.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 23, 2007 5:43 am 
Offline
Joined: Tue Nov 28, 2006 3:38 am
Posts: 82
Location: Kangasala, Finland
Simon, thanks a million - the solution worked perfectly!

_________________
Jari-Matti

MBE&FE: GeForce MX440, Athlon XP 2000+, MSI KT333 Ultra, onboard audio, 512 MB, 2 x Technotrend T1500 DVB-T, LiteOn DVD±RW 16x DW1650-488C, Seagate 250 GB
FE: 1500MHz Geforce MX200-V, int. audio, 256MB


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 72 posts ] 
Go to page 1, 2, 3, 4, 5  Next



All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu