Well, then there are two possibilities:

1.  r['dateTime'] was a different value than 1554322200; or
2. There was some kind of delay getting the record into the database. The
AWEKAS code did its query before the record had appeared.

-tk

On Thu, Apr 4, 2019 at 7:51 AM Luc Heijst <[email protected]> wrote:

> On Thursday, 4 April 2019 11:21:08 UTC-3, Thomas Keffer wrote:
>>
>>  It is None because the record *was not in the database*. Why?
>>
>
> I don't agree: the record *is* in the database; these are the values:
>
> INSERT INTO `archive` (`dateTime`, `usUnits`, `interval`, `barometer`,
> `pressure`, `altimeter`, `inTemp`, `outTemp`, `inHumidity`, `outHumidity`,
> `windSpeed`, `windDir`, `windGust`, `windGustDir`, `rainRate`, `rain`,
> `dewpoint`, `windchill`, `heatindex`, `ET`, `radiation`, `UV`,
> `extraTemp1`, `extraTemp2`, `extraTemp3`, `soilTemp1`, `soilTemp2`,
> `soilTemp3`, `soilTemp4`, `leafTemp1`, `leafTemp2`, `extraHumid1`,
> `extraHumid2`, `soilMoist1`, `soilMoist2`, `soilMoist3`, `soilMoist4`,
> `leafWet1`, `leafWet2`, `rxCheckPercent`, `txBatteryStatus`,
> `consBatteryVoltage`, `hail`, `hailRate`, `heatingTemp`, `heatingVoltage`,
> `supplyVoltage`, `referenceVoltage`, `windBatteryStatus`,
> `rainBatteryStatus`, `outTempBatteryStatus`, `inTempBatteryStatus`,
> `cloudbase`, `humidex`, `appTemp`, `beaufort`, `windrun`, `maxSolarRad`)
> VALUES
> (1554322200, 16, 5, NULL, 1009.14, 1009.31912168591, 37.2, NULL, NULL,
> 65.8, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
> 0.00190080488960694, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
> 28.8287556510223, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 200, NULL,
> NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0,
> NULL, NULL, NULL, NULL, NULL, NULL, 103.266753335247, 321.291353463412);
>
> The value of rainRate is NULL (sorry, I said before the value is None).
>
> Look at lines 278, 292, 310 in restx.py:
>       if _result is not None and _result[0] is not None:
>
> Should we not do here the same?
>       if rr is not None and rr[0] is not None:
>
> Luc
>
> --
> You received this message because you are subscribed to the Google Groups
> "weewx-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to