Good eye!!! You are quite correct!  My bad again.  I have actually issued a 
few import commands:

*PYTHONPATH=/var/tmp/weewx4_src/weewx/bin 
/var/tmp/weewx4_src/weewx/bin/wee_import --import-config=/var/tmp/wu.conf 
--from=2019-05-20T07:00 --to=2019-05-20T23:59*

*--- just a couple log entries ---*

*Jan  6 21:22:55 www2 journal: wee_import[31892] INFO weewx.manager: Added 
record 2019-05-20 23:54:48 PDT (1558421688) to database 'weewx.sdb'*

*Jan  6 21:22:55 www2 journal: wee_import[31892] INFO weewx.manager: Added 
record 2019-05-20 23:54:48 PDT (1558421688) to daily summary in 'weewx.sdb'*

A ton of successful hits, but the html did not update.
---

*PYTHONPATH=/var/tmp/weewx4_src/weewx/bin 
/var/tmp/weewx4_src/weewx/bin/wee_import --import-config=/var/tmp/wu.conf *


Success again, but when I ran it a second time I see this:

*Jan  6 21:43:48 www2 journal: wee_import[759] ERROR weewx.manager: Unable 
to add record 2020-01-06 21:19:48 PST (1578374388) to database 'weewx.sdb': 
PRIMARY KEY must be unique*


which I believe tells me that the records were imported on the first run, 
but because they exist it can not import them due to the primary key 
exists, which is probably set to the date stamp?



PYTHONPATH=/var/tmp/weewx4_src/weewx/bin 
/var/tmp/weewx4_src/weewx/bin/wee_import --import-config=/var/tmp/wu.conf 
--date=2020-01-05

PYTHONPATH=/var/tmp/weewx4_src/weewx/bin 
/var/tmp/weewx4_src/weewx/bin/wee_import --import-config=/var/tmp/wu.conf 
--date=2020-01-04

PYTHONPATH=/var/tmp/weewx4_src/weewx/bin 
/var/tmp/weewx4_src/weewx/bin/wee_import --import-config=/var/tmp/wu.conf 
--date=2020-01-03


All of these have similar entries telling me Added records and the same 
fail when running a second time.


I ran '*wee**_database --check'* and '*wee**_reports*' just because I ran 
those in my cron job before everything broke.  I was thinking one of those 
updated the html, and png files.


I thought about it before I ran the commands, and I could have a permission 
issue on the directory because the cron ran as root, so I logged in as root 
before issuing the commands.  Might have to go back in and fix some 
permissions after, but running as root should have resolved any permission 
issues.  However when I cd to the weewx directory on my web server and 
issue:

*lynx index.html*


*-----*

05/20/2019 07:04:57 AM


   Current Conditions

   Outside Temperature       57.6°F

   Wind Chill                57.6°F

-----

the previous date is shown in the html.  :(

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/863a7a0f-21a3-400e-bd65-a237faeea05c%40googlegroups.com.

Reply via email to