Author Topic: wxwuhistory.php (missing data)  (Read 722 times)

0 Members and 1 Guest are viewing this topic.

Offline dasman

  • Forecaster
  • *****
  • Posts: 491
    • Wx Peotone
wxwuhistory.php (missing data)
« on: January 11, 2023, 12:55:12 PM »
I have noticed that when using the script www.peotoneweather.com/wxwuhistory.php,  not all of the data is showing.For example on my website when I use the script it shows the data from midnight to 09:54. The rest of the day is missing. When I go to the weather underground and call up the table for Jan 8th, all of the data is there. Not all dates do this. And the dates that do have different amounts of data missing in the script, but all of the data is available from the table on WU. Anyone else experience this?
Dave Sommerfed
Peotone Illinois USA
CW7762, KILPEOT1
NWS COOP, CoCoRaHS, Spotter Network

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9279
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: wxwuhistory.php (missing data)
« Reply #1 on: January 11, 2023, 02:30:41 PM »
You should update WXDailyHistory.php to  Version 1.33 - 28-May-2020 .. I think that will fix the issue.
download
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline dasman

  • Forecaster
  • *****
  • Posts: 491
    • Wx Peotone
Re: wxwuhistory.php (missing data)
« Reply #2 on: January 14, 2023, 10:43:08 AM »
Hi Ken. I downloaded the updated script, but it did not fix the issue. I am still getting partial returns for some dates,
Dave Sommerfed
Peotone Illinois USA
CW7762, KILPEOT1
NWS COOP, CoCoRaHS, Spotter Network

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9279
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: wxwuhistory.php (missing data)
« Reply #3 on: January 14, 2023, 08:17:53 PM »
For the dates that have partial results, just delete the cache file corresponding to that date and browse with your wxwuhistory.php to that date .. it should re-download the JSON file with complete data.

look in ./cache/ for files like: wuday-YYYYMMDD-{yourWUid}-e.json  where YYYYMMDD is year, 2digit month, 2digit day
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline dasman

  • Forecaster
  • *****
  • Posts: 491
    • Wx Peotone
Re: wxwuhistory.php (missing data)
« Reply #4 on: January 14, 2023, 08:56:39 PM »
 Thanks, Ken, that worked! However, it opened up a can of worms. Turns out the missing data issue went back many years. Ended up erasing all of the cache files for WU daily.
Dave Sommerfed
Peotone Illinois USA
CW7762, KILPEOT1
NWS COOP, CoCoRaHS, Spotter Network

Offline dasman

  • Forecaster
  • *****
  • Posts: 491
    • Wx Peotone
Re: wxwuhistory.php (missing data)
« Reply #5 on: January 14, 2023, 10:14:17 PM »
Apparently, I deleted a needed file from the cache! How do I get this file in there?


Warning: include_once(./cache/sadata.php): failed to open stream: No such file or directory in /home/ybuhhqulwjts/public_html/index.php on line 80

Warning: include_once(): Failed opening './cache/sadata.php' for inclusion (include_path='.:/opt/alt/php74/usr/share/pear') in /home/ybuhhqulwjts/public_html/index.php on line 80

Notice: Undefined variable: spandata in /home/ybuhhqulwjts/public_html/index.php on line 81

Notice: Trying to access array offset on value of type null in /home/ybuhhqulwjts/public_html/index.php on line 81
Dave Sommerfed
Peotone Illinois USA
CW7762, KILPEOT1
NWS COOP, CoCoRaHS, Spotter Network

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9279
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: wxwuhistory.php (missing data)
« Reply #6 on: January 14, 2023, 10:18:48 PM »
I don't recognize 'sadata.php' as one of my template/script files.  Sorry.. unable to advise on it other that to say 'restore from backup'.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline dasman

  • Forecaster
  • *****
  • Posts: 491
    • Wx Peotone
Re: wxwuhistory.php (missing data)
« Reply #7 on: January 14, 2023, 10:26:14 PM »
Thanks Ken. I found it. It's from Curly's old special announcement script.
Dave Sommerfed
Peotone Illinois USA
CW7762, KILPEOT1
NWS COOP, CoCoRaHS, Spotter Network

Offline dasman

  • Forecaster
  • *****
  • Posts: 491
    • Wx Peotone
Re: wxwuhistory.php (missing data)
« Reply #8 on: January 19, 2023, 12:53:13 PM »
Ken I noticed my original problem is back. So i have updated the script, but on Jan17, the table stops at 11:04pm. When I go to WU, all of the data thru midnight is there. Could this be a WU thing? January 16th has even less data! There is no pattern to when the data is missing. Sometimes it may be a week of complete data and then some missing. Other times its multiple days in a row. All of the dates prior to Jan 14th I removed from the cache file.
« Last Edit: January 19, 2023, 12:55:49 PM by dasman »
Dave Sommerfed
Peotone Illinois USA
CW7762, KILPEOT1
NWS COOP, CoCoRaHS, Spotter Network

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: wxwuhistory.php (missing data)
« Reply #9 on: January 19, 2023, 12:59:33 PM »
Ken I noticed my original problem is back. So i have updated the script, but on Jan17, the table stops at 11:04pm. When I go to WU, all of the data thru midnight is there. Could this be a WU thing? January 16th has even less data! There is no pattern to when the data is missing. Sometimes it may be a week of complete data and then some missing. Other times its multiple days in a row. All of the dates prior to Jan 14th I removed from the cache file.

There is a limit of allowed accesses to retrieve data from WU, which could cause those "end-of-day" no more data situations.
You can check on your WU dashboard the usage of the API-key and if it "maximised out" on those days.

Hope this helps,
Wim