Author Topic: Weather ET reporter continuous error  (Read 2650 times)

Cyberhusky

  • Calm
  • *
  • Posts: 9
    • EW1663
    • IRAMBROU2
  • Station Details: Davis Vantage Pro 2, WeatherCat on Mac mini
Weather ET reporter continuous error
« on: April 16, 2014, 09:30:33 AM »
Hi everybody

after installing the latest WeatherCat AppleScripts to report ET (evapotranspiration) data, I do get this error all the time.
As seen in the attached picture, though the number differs always.

The BC ET export only worked once, but I never see VP2ET data exported.

I did notice too that even if I change the prefs files, the data isn't set in the main apple script ET Reprter file. Though I did change the settings in the main apple script file.

Any hints?
My weather station is located in Europe so I use metrical data.


elagache

  • Global Moderator
  • Storm
  • *****
  • Posts: 6506
    • DW3835
    • KCAORIND10
    • Canebas Weather
  • Station Details: Davis Vantage Pro-2, Mac mini (2018), macOS 10.14.3, WeatherCat 3
Dear Cyberhusky and WeatherCat fans,

*Heavy Sigh* . . . . . . .

after installing the latest WeatherCat AppleScripts to report ET (evapotranspiration) data, I do get this error all the time.
As seen in the attached picture, though the number differs always.

Yes, I'm afraid I'm familiar with this misery.  The problem is that Apple never properly implemented OS X internationalization features for AppleScript.  So it is possible to translate the strings into other languages and integer numbers are handled more or less.  Alas, dealing with real numbers isn't properly handled at all.

What is happening in your case is that a comma is used for the decimal point, but the function you are trying to use expects a period.

If you haven't considered this, you might try downloading and installing the Satimage AppleScript library: Satimage osax 3.7.1 (build 392)

http://www.satimage.fr/software/downloads/Satimage392.pkg

It provides a replacement for the printf function that has failed in this case.  Since it was written by a French company, it might handle the problem you describe because the French also use a comma as a decimal point. 

Alas, it may not be possible to make this AppleScript work for you.  Work on these AppleScripts essentially collapsed when I found that making them usable outside the United States was next to impossible.  I continue to maintain them minimally, but I really need to start over and rewrite them as either WeatherCat plug-ins or true Mac applications.  I just haven't had any time to take up the new project.

Sorry, Edouard

Cyberhusky

  • Calm
  • *
  • Posts: 9
    • EW1663
    • IRAMBROU2
  • Station Details: Davis Vantage Pro 2, WeatherCat on Mac mini
Re: Weather ET reporter continuous error
« Reply #2 on: April 18, 2014, 07:52:17 AM »
Hello Edouard,

Thx a lot for the hints and the Satimage AppleScript library tip.

I think the scripts works now. Still testing?

Here's the email from last night:

Quote
WC ET Reporter estimates the following evapotranspiration losses for Donnerstag, 17. April 2014

The Penman-Monteith estimate of daily evapotranspiration was: 3.40mm

The estimated evapotranspiration over the past 3 days was: 3.49mm
Over the past 3 days, the average evapotranspiration was: 1.16mm

The estimated evapotranspiration over the past 7 days was: 3.66mm
Over the past 7 days, the average evapotranspiration was: 0.52mm

and the BC ET respectively the VP2 ET data files:

Quote
Date   High temp    Low temp   Daily rain   ET
4/14/2014   20,11   3,56   0,0   3,66
4/17/2014   20,11   0,06   0,0   3,91

Quote
Date   High temp    Low temp   Daily rain   ET
4/17/2014   20,11   0,06   0,0   3,4

Thx again

elagache

  • Global Moderator
  • Storm
  • *****
  • Posts: 6506
    • DW3835
    • KCAORIND10
    • Canebas Weather
  • Station Details: Davis Vantage Pro-2, Mac mini (2018), macOS 10.14.3, WeatherCat 3
Good to hear!! (Re: Weather ET reporter continuous error)
« Reply #3 on: April 18, 2014, 09:37:33 PM »
Dear Cyberhusky and WeatherCat fans,

Thx a lot for the hints and the Satimage AppleScript library tip.

I think the scripts works now. Still testing?

. . . . .

Thx again

Your sample output looks correct so indeed it appears using the Satimage AppleScript library solved your problem - glad to hear it!  [tup]

Anyone using my AppleScripts should probably download and install those libraries.  It will speed up the AppleScripts significantly.  It should be described in the documentation.

Cheers, Edouard  [cheers1]