Page 1 of 1

Steel Gauges json error

Posted: Tue 29 Mar 2022 6:24 pm
by The PIT
Random parserror syntaxerror json parser unexpected end of data at line 1 column 1 of jsondata

This seems to occur after page timeout at times it can run for hours no issues, sometime corrects itself other times it doesn't.

Sadly doens't say which json file and I wonder if it's just hitting the time the json file is updating.

https://www.sheffieldweather.net/live_weather.htm

Re: Steel Gauges json error

Posted: Tue 29 Mar 2022 6:49 pm
by saratogaWX
Your homepage uses https://www.sheffieldweather.net/realtimegauges.txt for the JSON to display the Gauges.
The file https://www.sheffieldweather.net/websitedata.json is loaded once at page load. The realtimegauges.txt file is accessed by jQuery every second or so (you should make that every 4 seconds or so).

It's likely that the failure happens when an incomplete realtimegauges.txt file is accessed just while MX is uploading it to your website.

Re: Steel Gauges json error

Posted: Tue 29 Mar 2022 7:55 pm
by The PIT
Yup definitely the update now does it every 20's then corrects itself four seconds later

Re: Steel Gauges json error

Posted: Wed 30 Mar 2022 9:17 am
by mcrossley
In your FTP configuration are you using the "rename" option, that effectively eliminates the time the file is incomplete.

Re: Steel Gauges json error

Posted: Sat 02 Apr 2022 5:58 pm
by The PIT
That fixed it. Strange it never used to be a problem.