GoCubs;509485 Wrote: > Thanks Mark- > > I've seen similar behavior on a handful of instances. I think what's > happening is weather.com is giving a half baked web response that > doesn't parse with tree builder and then when I try to walk the null > tree it craps out with a real exception which kills the plugin. > > I need to play with tree builder/Perl to see if there's an elegant way > to check for that condition. I can add null value checks all over the > place, but given the number of parses it makes the code look very ugly. > It also doesnt help that it's not an easily reproducible condition to > program against. > > -Greg
Greg, I happened to be on the other night when weather.com started barfing. When the site was unreliable, it seemed to return one of 3 ways when forcing a refresh; 1 - Timed out 2 - Returned a 404 page not found 3 - Returned a completely blank page Sorry that I didn't capture the page source when this was happening. I believe the 1st is probably dealt with by squeezebox server's error handling, but the latter 2 will likely return all the way to the plugin and will have to be thrown out there. It may not be fool proof, but can you begin your gotWeather, got10day, & gotAverages routines with a check for something that always appears on the page and if it's not there assume it's a garbage page and throw it out? Don -- BoomX2 ------------------------------------------------------------------------ BoomX2's Profile: http://forums.slimdevices.com/member.php?userid=33529 View this thread: http://forums.slimdevices.com/showthread.php?t=73222 _______________________________________________ plugins mailing list plugins@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/plugins