Page 2 of 2

Re: Upgrade to CUtils 6.17.3

Posted: Sun 30 Apr 2023 4:02 pm
by HansR
What did you change?

I get the following in the console:
    Schermafbeelding 2023-04-30 175728.png
      You ask data from meteo.laurentmey.fr by a call from laurentmey.fr. It regards that as two different domains apparently and the CORS blocks the fetch of data.

      Re: Upgrade to CUtils 6.17.3

      Posted: Sun 30 Apr 2023 4:38 pm
      by laulau
      I changed http://laurentmey.fr/meteo/utils/index.html from http://meteo.laurentmey.fr/utils/index.html .
      It points to the same file but it isn't the same domain :bash:

      Re: Upgrade to CUtils 6.17.3

      Posted: Sun 30 Apr 2023 5:02 pm
      by HansR
      laulau wrote: Sun 30 Apr 2023 4:38 pm I changed http://laurentmey.fr/meteo/utils/index.html from http://meteo.laurentmey.fr/utils/index.html .
      It points to the same file but it isn't the same domain :bash:
      If you regenerate Cutils completely (so without thrifty) to http://meteo.laurentmey.fr/utils/ , I think it should start working again. I assume you just copied the whole directory structure? You send all data from CMX to http://meteo.laurentmey.fr/utils/ don't you?

      Re: Upgrade to CUtils 6.17.3

      Posted: Sun 30 Apr 2023 5:39 pm
      by laulau
      I just changed the link in my browser to access to utils, it works for http://laurentmey.fr/meteo/utils/index.html but not with http://meteo.laurentmey.fr/utils/index.html.

      Re: Upgrade to CUtils 6.17.3

      Posted: Sun 30 Apr 2023 5:59 pm
      by HansR
      Your library cumulusutils.js has the CumulusRealTimeLocation configured as http://laurentmey.fr/cmxui/. That should be empty because it fetches from that machine already. If you want to fetch it from another location that location MUST be on the same domain. You can't fetch your data from another domain.

      How do you want to configure your sites (I assume you configure more sites).
      I remember we had that issue several years ago as well but I can't remember how you solved it.

      Re: Upgrade to CUtils 6.17.3

      Posted: Sun 30 Apr 2023 7:02 pm
      by laulau
      Both are working.
      http://laurentmey.fr/davis/utils/index.html from my VP2
      http://laurentmey.fr/meteo/utils/index.html from my WeatherDuino

      But if i access the second one from http://meteo.laurentmey.fr/utils/index.html, main page don't update. (not same domain)
      In other words i have : meteo.laurentmey.fr that points to laurentmey.fr/meteo/ (not same domain)
      No worry, all working as it should if accessed from the right root.

      Re: Upgrade to CUtils 6.17.3

      Posted: Sun 30 Apr 2023 7:33 pm
      by HansR
      OK

      Re: Upgrade to CUtils 6.17.3

      Posted: Mon 01 May 2023 2:23 pm
      by laulau
      Hi Hans,
      i have a lot of errors concerning my old data files:
      2023-05-01 00:00:43.064 ReadMonthlyLogs: reading data/août02log.txt
      2023-05-01 00:00:43.078 Error MonthfileValue.SetValues fail: L'index se trouve en dehors des limites du tableau.
      2023-05-01 00:00:43.078 Error MonthfileValue.SetValues: in field nr 19 does not exist in this file
      2023-05-01 00:00:43.078 Error MonthfileValue.SetValues: line is: 01/08/02,00:05,18.8,92,17.5,5.0,4.3,224,1.0,0.0,1009.0,56.0,,,4.3,19.0,18.8
      2023-05-01 00:00:43.078 Information Monthfile.SetValues : Continuing to read data
      2023-05-01 00:00:43.078 Error ReadMonthlyLogs: File data/août02log.txt skipped, it is from before 27 jan 2004!
      Is there a way for CUtils to ignore the field 19 for old files ?
      What are the limits of this field ?
      I suppose that files before 27 jan 2004 couldn' be from Cumulus!
      Thanks

      Re: Upgrade to CUtils 6.17.3

      Posted: Mon 01 May 2023 3:56 pm
      by HansR
      @laulau: yes, I get your point. There are the following situations:
      1. The file is from before 27 jan 2004 and is skipped after one message. This will remain so.
      2. It can't find one or more fields. In this case it gives ten messages and it skips to the next file. I will parameterize the number 10 such that you can set it to any number you want. You find attached version 6.18.2 beta 2
      3. You can reduce the number of messages in the logfile by setting the level to error, warning, info or verbose. You can also setting logging off if you want to
      Hope this helps.

      NOTE: In section General create parameter MaxErrors=; you can give it any integer value including 0. This should solve your issue of number of messages. If necessary we may adjust to your liking. Please send logfile if n eed to discuss.

      Re: Upgrade to CUtils 6.17.3

      Posted: Mon 01 May 2023 4:57 pm
      by laulau
      Give me a little clarification:
      for which calculations are these files in error they ignored ?
      Log file with MaxErrors=0.
      So the files with the error in field 19 are still ignored but not logged ?

      Re: Upgrade to CUtils 6.17.3

      Posted: Mon 01 May 2023 5:40 pm
      by HansR
      laulau wrote: Mon 01 May 2023 4:57 pm Give me a little clarification:
      for which calculations are these files in error they ignored ?
      Log file with MaxErrors=0.
      So the files with the error in field 19 are still ignored but not logged ?
      The errors are detected while reading the monthly logs. The errors found are simply not logged, the rest of the processing is not changed (so setting the value to 0 may make you forget there are errors, I would use at least the value 1).
      It is not so much calculations, it is building the list of values which it uses for the graphs and reports.
      The MaxErrors just gives you the possibility to suppress the errors in the log, it does not change the processing.

      In your case it is about the EVT (Evapotranspiration) field - field 19 and beyond which are not present. The other fields are present so they are read and processed. For the months where the error occurs the files are normally processed and you will see the relevant charts but the EVT chart will not have values for that month. Note that the theoretical max solar radiation is also not logged when this error occurs. Everything beyond field 19 is not there. That is implicit.

      Hope this helps.
      Any more questions, let me know.

      Re: Upgrade to CUtils 6.17.3

      Posted: Tue 02 May 2023 3:56 pm
      by HansR
      @laulau: btw I looked at the site a bit more in detail because of the long series and the errors related to that (you have more than 20 years) and for both rain and temperature it would be interesting to see how your station stats deviates from the normal stats (in e.g. the total rain/year reference lines).

      You can reach that by setting

      Code: Select all

      UseNormalTempReference=both
      UseNormalRainReference=both
      
      See e.g. the rain chart wiki for this.
      (sorry for the usage interference ;) )