Page 1 of 1

Web tag error

Posted: Fri 12 Aug 2022 1:32 pm
by Benji60
Hello,
I just noticed this very recurrent webtag error:

I never modified this file from memory and this error seems to be quite recent if I'm not mistaken:

Code: Select all

2022-08-12 15:12:32.056 Web tag error in file: 
2022-08-12 15:12:32.056 token=<#recordsbegandate format="%M">
2022-08-12 15:12:32.056 Position in file (character)=10
2022-08-12 15:12:32.056 Exception: i=0 len=85
2022-08-12 15:12:32.056 inputText.Length=85
2022-08-12 15:12:32.057 System.FormatException: Format_UnknownDateTimeWord
  at System.DateTimeParse.Parse (System.ReadOnlySpan`1[T] s, System.Globalization.DateTimeFormatInfo dtfi, System.Globalization.DateTimeStyles styles) [0x0002a] in <162bccb5b7ae4c18b9c0cff8fdc3dfbc>:0 
  at System.DateTime.Parse (System.String s) [0x00015] in <162bccb5b7ae4c18b9c0cff8fdc3dfbc>:0 
  at CumulusMX.WebTags.Tagrecordsbegandate (System.Collections.Generic.Dictionary`2[TKey,TValue] tagParams) [0x0000b] in <e638f7d124564cabb4e890f39313adb2>:0 
  at CumulusMX.WebTags.GetWebTagText (System.String tagString, System.Collections.Generic.Dictionary`2[TKey,TValue] tagParams) [0x00025] in <e638f7d124564cabb4e890f39313adb2>:0 
  at CumulusMX.Cumulus.TokenParserOnToken (System.String strToken, System.String& strReplacement) [0x00064] in <e638f7d124564cabb4e890f39313adb2>:0 
  at CumulusMX.TokenParser.Parse3 () [0x000a3] in <e638f7d124564cabb4e890f39313adb2>:0 
2022-08-12 15:12:32.057 ** The output file will contain an error message starting "**Web tag error"
2022-08-12 15:12:32.058 Web tag error in file: 
2022-08-12 15:12:32.058 token=<#recordsbegandate format="yyyy">
2022-08-12 15:12:32.058 Position in file (character)=51
2022-08-12 15:12:32.058 Exception: i=41 len=85
2022-08-12 15:12:32.058 inputText.Length=85
2022-08-12 15:12:32.059 System.FormatException: Format_UnknownDateTimeWord
  at System.DateTimeParse.Parse (System.ReadOnlySpan`1[T] s, System.Globalization.DateTimeFormatInfo dtfi, System.Globalization.DateTimeStyles styles) [0x0002a] in <162bccb5b7ae4c18b9c0cff8fdc3dfbc>:0 
  at System.DateTime.Parse (System.String s) [0x00015] in <162bccb5b7ae4c18b9c0cff8fdc3dfbc>:0 
  at CumulusMX.WebTags.Tagrecordsbegandate (System.Collections.Generic.Dictionary`2[TKey,TValue] tagParams) [0x0000b] in <e638f7d124564cabb4e890f39313adb2>:0 
  at CumulusMX.WebTags.GetWebTagText (System.String tagString, System.Collections.Generic.Dictionary`2[TKey,TValue] tagParams) [0x00025] in <e638f7d124564cabb4e890f39313adb2>:0 
  at CumulusMX.Cumulus.TokenParserOnToken (System.String strToken, System.String& strReplacement) [0x00064] in <e638f7d124564cabb4e890f39313adb2>:0 
  at CumulusMX.TokenParser.Parse3 () [0x000a3] in <e638f7d124564cabb4e890f39313adb2>:0 
2022-08-12 15:12:32.059 ** The output file will contain an error message starting "**Web tag error"
2022-08-12 15:15:00.414 DoLogFile: Writing log entry for 12/08/2022 15:15:00
2022-08-12 15:15:00.415 DoLogFile: log entry for 12/08/2022 15:15:00 written
2022-08-12 15:15:00.416 Writing today.ini, LastUpdateTime = 12/08/2022 15:15:00 raindaystart = 239 rain counter = 239
2022-08-12 15:20:00.474 DoLogFile: Writing log entry for 12/08/2022 15:20:00
2022-08-12 15:20:00.475 DoLogFile: log entry for 12/08/2022 15:20:00 written
2022-08-12 15:20:00.476 Writing today.ini, LastUpdateTime = 12/08/2022 15:20:00 raindaystart = 239 rain counter = 239
2022-08-12 15:20:00.499 Web tag error in file: web/websitedataT.json
2022-08-12 15:20:00.499 token=<#recordsbegandate>
2022-08-12 15:20:00.499 Position in file (character)=338
2022-08-12 15:20:00.499 Exception: i=315 len=31068
2022-08-12 15:20:00.499 inputText.Length=31068
2022-08-12 15:20:00.500 System.FormatException: Format_UnknownDateTimeWord
  at System.DateTimeParse.Parse (System.ReadOnlySpan`1[T] s, System.Globalization.DateTimeFormatInfo dtfi, System.Globalization.DateTimeStyles styles) [0x0002a] in <162bccb5b7ae4c18b9c0cff8fdc3dfbc>:0 
  at System.DateTime.Parse (System.String s) [0x00015] in <162bccb5b7ae4c18b9c0cff8fdc3dfbc>:0 
  at CumulusMX.WebTags.Tagrecordsbegandate (System.Collections.Generic.Dictionary`2[TKey,TValue] tagParams) [0x0000b] in <e638f7d124564cabb4e890f39313adb2>:0 
  at CumulusMX.WebTags.GetWebTagText (System.String tagString, System.Collections.Generic.Dictionary`2[TKey,TValue] tagParams) [0x00025] in <e638f7d124564cabb4e890f39313adb2>:0 
  at CumulusMX.Cumulus.TokenParserOnToken (System.String strToken, System.String& strReplacement) [0x00064] in <e638f7d124564cabb4e890f39313adb2>:0 
  at CumulusMX.TokenParser.Parse3 () [0x000a3] in <e638f7d124564cabb4e890f39313adb2>:0 
2022-08-12 15:20:00.500 ** The output file will contain an error message starting "**Web tag error"
2022-08-12 15:20:00.500 Web tag error in file: web/websitedataT.json
2022-08-12 15:20:00.500 token=<#recordsbegandate format=yyyy-MM-dd>
2022-08-12 15:20:00.500 Position in file (character)=383
2022-08-12 15:20:00.500 Exception: i=357 len=31068
2022-08-12 15:20:00.500 inputText.Length=31068
2022-08-12 15:20:00.500 System.FormatException: Format_UnknownDateTimeWord
  at System.DateTimeParse.Parse (System.ReadOnlySpan`1[T] s, System.Globalization.DateTimeFormatInfo dtfi, System.Globalization.DateTimeStyles styles) [0x0002a] in <162bccb5b7ae4c18b9c0cff8fdc3dfbc>:0 
  at System.DateTime.Parse (System.String s) [0x00015] in <162bccb5b7ae4c18b9c0cff8fdc3dfbc>:0 
  at CumulusMX.WebTags.Tagrecordsbegandate (System.Collections.Generic.Dictionary`2[TKey,TValue] tagParams) [0x0000b] in <e638f7d124564cabb4e890f39313adb2>:0 
  at CumulusMX.WebTags.GetWebTagText (System.String tagString, System.Collections.Generic.Dictionary`2[TKey,TValue] tagParams) [0x00025] in <e638f7d124564cabb4e890f39313adb2>:0 
  at CumulusMX.Cumulus.TokenParserOnToken (System.String strToken, System.String& strReplacement) [0x00064] in <e638f7d124564cabb4e890f39313adb2>:0 
  at CumulusMX.TokenParser.Parse3 () [0x000a3] in <e638f7d124564cabb4e890f39313adb2>:0 
2022-08-12 15:20:00.500 ** The output file will contain an error message starting "**Web tag error"
Thanks!

Re: Web tag error

Posted: Sat 13 Aug 2022 5:46 am
by sfws
Benji60 wrote: Fri 12 Aug 2022 1:32 pm this error seems to be quite recent if I'm not mistaken:
In recent MX releases there have been several changes to handling of dates. Only the developer can answer whether any of his changes might affect the ability to use <#recordsbegandate format=yyyy>. (The use of double quotation marks round that parameter value is optional).

Have you recently edited your record began date - see my screenshot at viewtopic.php?p=162868#p162868 and my referenced text at viewtopic.php?p=162853#p162853 - maybe Cumulus has a problem with how that date has been expressed?

Re: Web tag error

Posted: Sat 13 Aug 2022 2:25 pm
by mcrossley
I have tested various formats in the records began date web tag and they all work OK. I suspect your records began date string is badly formed/input.