ViolatedPrecondition: lastUpdate

27 views
Skip to first unread message

Joachim Puttkammer

unread,
May 13, 2020, 3:18:35 PM5/13/20
to weewx-user
Hi,
To import data into the weewx database, I transferred this database and the data to be imported from the Raspi to the local PC, because it is much faster.  To test the import I started Weewx on the local PC (simulator) and after 2 runs ( added record ) I stopped weewx and removed the last two simulator records from the file. Database back to the Raspi and now I get the following error message :
ViolatedPrecondition: lastUpdate(2020-05-13 11:34:00 CEST (1589362440)) > lastRecord(2020-05-13 08:39:00 CEST (1589351940))
**** Exiting.
I added a record with lastUpdate Time, after that weewx started, but data for about 3 hours is missing.
Where can I manipulate the entry lastUpdate?

Joachim

Tom Keffer

unread,
May 13, 2020, 3:45:59 PM5/13/20
to weewx-user
You're leaving out a lot of details, in particular, what you mean by "...this database and the data to be imported..."

Inside a WeeWX database is actually two databases: the "archive" database, and the "daily summaries" database. You can't just add new data in the former (using SQL INSERT statements) without updating the latter. They have to be kept in sync. You have two choices:
  1. Depending on what you're trying to do, you might be able to use one of the WeeWX tools to do the import, which may be able to keep the daily summaries up to date.
  2. Alternatively, and perhaps the easiest, just drop the daily summaries and let WeeWX rebuild them. See wee_database --drop-daily.
-tk

--
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 weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/1bbc647c-d042-4482-a0b4-45c953933f65%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages