I have been able to reproduce your symptoms and I now believe I understand 
what is happening.

In terms of why wee_import wants to import from 27 and 28 October Vince has 
covered the main point. So as far as WeeWX is concerned (and assuming a 
five minute archive period) the first archive record of the 27 October 
covers the five minute period from midnight at the start of 27 October 
until 00:05, so the first archive period of the day is timestamped at five 
minutes after midnight. The last archive period covers the five minute 
period from 23:55 until (and including) midnight at the end of 27 October, 
so the last archive period of 27 October is timestamped at midnight on 28 
October. 

The other factor at play is how WU provides data via its API. The WU API 
call used by wee_import provides one full day of data at a time, the 
problem being that WU defines a day as starting at midnight at the start of 
the day though until (but not including) midnight at the end of the day. So 
when the WU API responds with data for 27 October the first record provided 
is the archive record timestamped at midnight at the start of 27 October, 
this archive record actually contains data from 26 October so it is 
discarded. The last record provided by WU is timestamped at 23:55 27 
October, which is only the second last archive record for the day. WU does 
not provide the last archive record of the day, to get that archive record 
we need to ask WU for the data for 28 October. The first record from the WU 
28 October data is used and the rest are discarded.

That is why when you attempt to import a given day of data from WU you will 
actually see wee_import obtain two days data from WU.

Now for your error message. To cut a long story short there was a flaw in 
how wee_import calculated the total elapsed time for an import. I believe I 
have fixed it. You can use the new code by downloading the updated 
weeimport.py and replacing weeimport.py on your system with the downloaded 
version. In an earlier post I gave you instructions for replacing 
wuimport.py, this time you need to replace weeimport.py, it is in the same 
directory as wuimport.py and the process is the same just a different file. 
You can download the updated weeimport.py via the following command:

$ wget -P /var/tmp 
https://raw.githubusercontent.com/weewx/weewx/V5/src/weeimport/weeimport.py

Do not get weeimport.py confused with wee_import.py, they are in different 
directories but if you replace the wrong file you will break wee_import.

Once you have replaced weeimport.py wee_import should work without error.

Gary

-- 
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/6ba2a0b7-1b18-4794-bc64-5c4d54e89023n%40googlegroups.com.

Reply via email to