Replies: 2 comments 1 reply
-
Beta Was this translation helpful? Give feedback.
1 reply
-
Thanks for the report. Closing as duplicate of #71. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi - I hope its me just doing something wrong. But...
I have some python code that pulls data from api.weather.gov that the JSON returned is 3 days old.
My question is : Why is data from 3 days ago being returned in the JSON? Or am I doing something wrong? Please :-)
My code pulls from this URL https://api.weather.gov/gridpoints/RAH/43,69/forecast
and then parses the JSON.
However the data appears to contain data from 3 days ago.
Below is the code pulled out of the larger script. The results are printed to the screen in the Try/Except block. The results (shown below for the UPDATED value is 09/21/2020 whereas the date today is 09/24/2020. I have noticed this for the past few days and tried multiple debug bits of code to zero in on the issue to no avail
**Screen shot

Returned_JSON_With_OldData.txt
** attached showing the returned JSON the system date/time and the returned data if using a browser from the same machine.
Attached is also the output of the JSON printed to screen
The code snippet below could be used to reproduce
I was expecting the data returned in the JSON to be pretty much the same as if I navigate using a browser to the same URL
Code snippet
URLHeaders = {
"Cache-Control":"no-cache",
"Pragma": "no-cache"
}
#URLHEaders tried adding URLHeaders as I am getting an old version of the JSON data from weather.gov in the initial request
***** end of code snippet
Printed returned JSON snippet showing hte data is updated 09/21/2020 - which is 3 days ago.
{'@context': ['https://geojson.org/geojson-ld/geojson-context.jsonld', {'@Version': '1.1', 'wx': 'https://api.weather.gov/ontology#', 'geo': 'http://www.opengis.net/ont/geosparql#', 'unit': 'http://codes.wmo.int/common/unit/', '@vocab': 'https://api.weather.gov/ontology#'}], 'type': 'Feature', 'geometry': {'type': 'Polygon', 'coordinates': [[[-79.448826, 36.153154], [-79.4519998, 36.1309056], [-79.42445029999999, 36.1283402], [-79.42127099999999, 36.150588299999995], [-79.448826, 36.153154]]]}, 'properties': {'updated': '2020-09-21T19:42:18+00:00',
Environment:
This is running on a Raspberry PI 4b with Version 10 Buster OS
using Python 3
Beta Was this translation helpful? Give feedback.
All reactions