Welcome to the Cumulus Support forum.
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Cumulus MX V4 beta test release 4.0.0 (build 4019) - 03 April 2024
Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)
Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Cumulus MX V4 beta test release 4.0.0 (build 4019) - 03 April 2024
Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)
Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki
broken weather underground forecast?
Moderator: saratogaWX
-
- Posts: 192
- Joined: Sun 04 Jan 2009 5:56 pm
- Weather Station: Vantage Vue
- Operating System: Windows 7
- Location: Middlesbrough, England
broken weather underground forecast?
just today I have started getting
Warning: Division by zero in /xxxxxxxxx/weather/WU-forecast.php on line 764
http://www.marton-weather.co.uk/
and I haven't changed anything in weeks, have WU changed their code recently?
If I go to the forecast I get the same
http://www.marton-weather.co.uk/wxforecast.php
but the link still works fine
http://www.wunderground.com/cgi-bin/fin ... IMIDDLES24
Any ideas please?
Cheers
Mark
Warning: Division by zero in /xxxxxxxxx/weather/WU-forecast.php on line 764
http://www.marton-weather.co.uk/
and I haven't changed anything in weeks, have WU changed their code recently?
If I go to the forecast I get the same
http://www.marton-weather.co.uk/wxforecast.php
but the link still works fine
http://www.wunderground.com/cgi-bin/fin ... IMIDDLES24
Any ideas please?
Cheers
Mark
- saratogaWX
- Posts: 1185
- Joined: Wed 06 May 2009 5:02 am
- Weather Station: Davis Vantage Pro Plus
- Operating System: Windows 10 Professional
- Location: Saratoga, CA, USA
- Contact:
Re: broken weather underground forecast?
Update to V2.06 of WU-forecast.php -- WeatherUnderground did a bit of page format changing on 13-Oct-2014 and that broke V2.05 of the script.
-
- Posts: 192
- Joined: Sun 04 Jan 2009 5:56 pm
- Weather Station: Vantage Vue
- Operating System: Windows 7
- Location: Middlesbrough, England
Re: broken weather underground forecast?
You are brilliant, thanks KensaratogaWX wrote:Update to V2.06 of WU-forecast.php -- WeatherUnderground did a bit of page format changing on 13-Oct-2014 and that broke V2.05 of the script.
- nitrx
- Posts: 1297
- Joined: Sun 13 Dec 2009 1:21 pm
- Weather Station: WH1080
- Operating System: Windows 10
- Location: Apeldoorn The Netherlands
- Contact:
Re: broken weather underground forecast?
V2.06 doesn't work ? http://apeldoorn.tk/weer/wxforecast.php?lang=ensaratogaWX wrote:Update to V2.06 of WU-forecast.php -- WeatherUnderground did a bit of page format changing on 13-Oct-2014 and that broke V2.05 of the script.
-
- Posts: 192
- Joined: Sun 04 Jan 2009 5:56 pm
- Weather Station: Vantage Vue
- Operating System: Windows 7
- Location: Middlesbrough, England
Re: broken weather underground forecast?
it works for me thanks, but on the index outlook top right, it now shows the "today" instead of "tonight" and further down and on the forecast pages, it shows "today", "today", Tomorrow", "tomorrow" "friday", friday" instead of having the work night when it is the forecast for the night.
http://www.marton-weather.co.uk/
Sure I did something to make that work before, not major just a minor issue.
Cheers
Mark
http://www.marton-weather.co.uk/
Sure I did something to make that work before, not major just a minor issue.
Cheers
Mark
- saratogaWX
- Posts: 1185
- Joined: Wed 06 May 2009 5:02 am
- Weather Station: Davis Vantage Pro Plus
- Operating System: Windows 10 Professional
- Location: Saratoga, CA, USA
- Contact:
Re: broken weather underground forecast?
WU-forecast.php V2.07 - 15-Oct-2014 is now available.
It seems that WeatherUnderground snuck in some ISO-8859-1 characters in station names instead of converting them to UTF-8 as required by the JSON json_decode() function. The script now spots that issue, runs the JSON through a utf8_encode() function and checks it for UTF-8 goodness.
This issue was causing 'no forecasts' for some international sites that have names with letters with diacritical marks (like umlaut, ring, cedilla, etc).
The period names in the forecast are all from WU and the JSON they produce. The script just shows their text since WU-forecast.php doesn't do language translation -- it relies on WU to do that and put the correct period names in the chosen language.
Best regards,
Ken
It seems that WeatherUnderground snuck in some ISO-8859-1 characters in station names instead of converting them to UTF-8 as required by the JSON json_decode() function. The script now spots that issue, runs the JSON through a utf8_encode() function and checks it for UTF-8 goodness.
This issue was causing 'no forecasts' for some international sites that have names with letters with diacritical marks (like umlaut, ring, cedilla, etc).
The period names in the forecast are all from WU and the JSON they produce. The script just shows their text since WU-forecast.php doesn't do language translation -- it relies on WU to do that and put the correct period names in the chosen language.
Best regards,
Ken
- nitrx
- Posts: 1297
- Joined: Sun 13 Dec 2009 1:21 pm
- Weather Station: WH1080
- Operating System: Windows 10
- Location: Apeldoorn The Netherlands
- Contact:
Re: broken weather underground forecast?
Thanks Ken it works again great job
Ron
Ron
- gluepack
- Posts: 460
- Joined: Tue 22 Jan 2013 9:20 pm
- Weather Station: PCE-FWS 20
- Operating System: Win 7 Pro
- Location: Zlatina, Bulgaria
Re: broken weather underground forecast?
Wow, how come it only started to fail for me today?
Anyway, I will try the new version.
Anyway, I will try the new version.
PWS links: Wunderground➤IVARNAPR3…CWOP/APRS➤E(W)2048…PWSWeather➤ZLATINABG…Awekas➤10631…Twitter➤@Zlatina_weather
Station type: PCE-FWS 20…Webcam link: View south to edge of Provadisko plateau
- gluepack
- Posts: 460
- Joined: Tue 22 Jan 2013 9:20 pm
- Weather Station: PCE-FWS 20
- Operating System: Win 7 Pro
- Location: Zlatina, Bulgaria
Re: broken weather underground forecast?
I really should keep a list of mods that I make.
I make some slight mods to cater for 10 day and to space out WeatherUnderground (I guess, unless you have changed that) but I notice that despite setting maxwidth and maxicons up front, you override them later on. I must remember that I have to change them too.
As with Sadgit, I have a problem on the index page with Today Today (sounds like a premature Annie song) showing instead of Today Tonight. Oh forget that, perhaps it was a cache problem or Weather Underground even as the 10 day forecast shows as Thursday/Thursday night, Tomorrow/Tomorrow, Saturday/Saturday, etc..
I make some slight mods to cater for 10 day and to space out WeatherUnderground (I guess, unless you have changed that) but I notice that despite setting maxwidth and maxicons up front, you override them later on. I must remember that I have to change them too.
As with Sadgit, I have a problem on the index page with Today Today (sounds like a premature Annie song) showing instead of Today Tonight. Oh forget that, perhaps it was a cache problem or Weather Underground even as the 10 day forecast shows as Thursday/Thursday night, Tomorrow/Tomorrow, Saturday/Saturday, etc..
PWS links: Wunderground➤IVARNAPR3…CWOP/APRS➤E(W)2048…PWSWeather➤ZLATINABG…Awekas➤10631…Twitter➤@Zlatina_weather
Station type: PCE-FWS 20…Webcam link: View south to edge of Provadisko plateau
-
- Posts: 192
- Joined: Sun 04 Jan 2009 5:56 pm
- Weather Station: Vantage Vue
- Operating System: Windows 7
- Location: Middlesbrough, England
Re: broken weather underground forecast?
Thnks Ken. I am still getting the problem I had before.. any ideas please?
Sadgit wrote:it works for me thanks, but on the index outlook top right, it now shows the "today" instead of "tonight" and further down and on the forecast pages, it shows "today", "today", Tomorrow", "tomorrow" "friday", friday" instead of having the work night when it is the forecast for the night.
http://www.marton-weather.co.uk/
Sure I did something to make that work before, not major just a minor issue.
Cheers
Mark
-
- Posts: 22
- Joined: Sat 07 Jan 2012 1:03 pm
- Weather Station: WS3080
- Operating System: windows server 2019 64 bit
- Location: Denmark
Re: broken weather underground forecast?
Hi
I have the same error in Danish no "nat" on the page, nat = night
Claus
I have the same error in Danish no "nat" on the page, nat = night
Claus
Last edited by cbnidk on Sat 18 Oct 2014 10:30 am, edited 1 time in total.
- SpaceWalker
- Posts: 67
- Joined: Sun 04 Mar 2012 2:54 am
- Weather Station: Davis Vantage
- Operating System: Windows XP
- Location: Eastern-Canada
- Contact:
Re: broken weather underground forecast?
Indeed, I have noticed the same situation where the name of the days are duplicated whereas the forecasts are different.
So, rather than bothering Ken, I have looked at the code, found the location where the variable '$nowdaytime' is located and added a few lines of code to take care of the missing 'tonight/night' words (it is my belief that Ken has been quite busy having to modify, if not to completely rewrite, the two scripts handling the forecasts and radar information from Environment Canada).
So, rather than bothering Ken, I have looked at the code, found the location where the variable '$nowdaytime' is located and added a few lines of code to take care of the missing 'tonight/night' words (it is my belief that Ken has been quite busy having to modify, if not to completely rewrite, the two scripts handling the forecasts and radar information from Environment Canada).
-
- Posts: 22
- Joined: Sat 07 Jan 2012 1:03 pm
- Weather Station: WS3080
- Operating System: windows server 2019 64 bit
- Location: Denmark
Re: broken weather underground forecast?
Hi
I have found the problem why the night is missing in line 674
foreach(array('day','night') as $dnpart) { Change to
foreach(array('day','Night') as $dnpart) {
Then the night is back but now the forecast and the picture is missing for the night
someone can fix this?
http://vejr.bloknet.dk/php/wxforecast.php
my site is in Danish but can be change to english if you like
Claus
I have found the problem why the night is missing in line 674
foreach(array('day','night') as $dnpart) { Change to
foreach(array('day','Night') as $dnpart) {
Then the night is back but now the forecast and the picture is missing for the night
someone can fix this?
http://vejr.bloknet.dk/php/wxforecast.php
my site is in Danish but can be change to english if you like
Claus
- saratogaWX
- Posts: 1185
- Joined: Wed 06 May 2009 5:02 am
- Weather Station: Davis Vantage Pro Plus
- Operating System: Windows 10 Professional
- Location: Saratoga, CA, USA
- Contact:
Re: broken weather underground forecast?
As I said above
There are other quirks with the JSON that cause issues, particularly around the times the forecast is rolling over to a new day on the WU site, and I can't fix that either
Best regards,
Ken
The issue with day/night names is the fault of Wunderground .. their JSON has a bug in it for 'night' in the title: field (which is used by the script for the period name in the selected language). WU-forecast doesn't do translation.. WU does. There is not a good (general) solution to this issue except to have WU fix their own JSON. Yes, individuals may choose to modify the script to produce the missing item, but it would be for a single-language and not applicable to both standalone/template users worldwide.The period names in the forecast are all from WU and the JSON they produce. The script just shows their text since WU-forecast.php doesn't do language translation -- it relies on WU to do that and put the correct period names in the chosen language.
There are other quirks with the JSON that cause issues, particularly around the times the forecast is rolling over to a new day on the WU site, and I can't fix that either
Best regards,
Ken
-
- Posts: 22
- Joined: Sat 07 Jan 2012 1:03 pm
- Weather Station: WS3080
- Operating System: windows server 2019 64 bit
- Location: Denmark
Re: broken weather underground forecast?
Have you seen my page all language have night if line 674 is change but if the forecast can't come back with this change it is not a waysaratogaWX wrote:As I said aboveThe issue with day/night names is the fault of Wunderground .. their JSON has a bug in it for 'night' in the title: field (which is used by the script for the period name in the selected language). WU-forecast doesn't do translation.. WU does. There is not a good (general) solution to this issue except to have WU fix their own JSON. Yes, individuals may choose to modify the script to produce the missing item, but it would be for a single-language and not applicable to both standalone/template users worldwide.The period names in the forecast are all from WU and the JSON they produce. The script just shows their text since WU-forecast.php doesn't do language translation -- it relies on WU to do that and put the correct period names in the chosen language.
There are other quirks with the JSON that cause issues, particularly around the times the forecast is rolling over to a new day on the WU site, and I can't fix that either
Best regards,
Ken
http://vejr.bloknet.dk/php/wxforecast.php
Claus