Gary,

yes, my mistake! I used the wrong version of weeimport.py while I was 
returning the original. I have many... Thanks for advising me. Sorry.

Now everything works and I could import data! Your patch was working great.

Thank you! You are really doing a good work!

best regards
Janne 


tiistai 22. helmikuuta 2022 klo 12.17.31 UTC+2 gjr80 kirjoitti:

> Janne,
>
> "It doesn't work" is not very helpful. Please return weeimport.py to it's 
> original 4.6.2 state, ensure you have the patched weeutil.py and then run 
> the import again. Please post an exact copy of the console output including 
> the command issued and responses/error traces.
>
> Gary
>
> On Tuesday, 22 February 2022 at 18:55:59 UTC+10 [email protected] wrote:
>
>> Gary,
>>
>> Thanks!
>> I installed the patch, but it did not help. I also tried to uncomment my 
>> own fix from weeimport.py, (the fix which you don't recommend to do...) but 
>> that returned my first problem back.
>>
>> My original date.csv has datetime format as in my csv.conf 
>> raw_datetime_format expect. Thanks anyway. 
>>
>> Janne
>>
>> tiistai 22. helmikuuta 2022 klo 4.42.37 UTC+2 gjr80 kirjoitti:
>>
>>> Janne,
>>>
>>> You've encountered a bug that shows when wee_import is run under python 
>>> 2 using a user defined field map. The fix required was not to wee_import 
>>> but elsewhere in WeeWX and will appear in the next release (expected to be 
>>> 4.6.3). In the meantime since you are using WeeWX v4.6.2 you can safely 
>>> just download the patched file, replace the corresponding file on your 
>>> system and wee_import should work fine. To download and install the 
>>> patched file:
>>>
>>> 1. move aside the file to be patched:
>>> $ mv /usr/share/weewx/weeutil/weeutil.py 
>>> /usr/share/weewx/weeutil/weeutil_orig.py
>>>
>>> 2. download the patched file:
>>> $ wget -P /usr/share/weewx/weeutil/ 
>>> https://raw.githubusercontent.com/weewx/weewx/master/bin/weeutil/weeutil.py
>>>
>>> 3. stop WeeWX (if it is running) and perform your import
>>>
>>> I did a test import using the patched file, your import config file and 
>>> your CSV data. The raw_datetime_format setting in your import config 
>>> file needs to be changed to match the format of the date-time field your 
>>> are using in your source data, it needs to be set as follows:
>>>
>>> raw_datetime_format = "%d.%m.%y %H:%M"
>>>
>>> With this change your data imported correctly and with out error. Note 
>>> that you will likely receive the following message during the import:
>>>
>>> Warning: Import field 'gustDir' is mapped to WeeWX field 'windGustDir' 
>>> but the
>>>          import field 'gustDir' could not be found in one or more 
>>> records.
>>>          WeeWX field 'windGustDir' will be set to 'None' in these 
>>> records.
>>>
>>> This is just a warning that you have a mapped field for which there is 
>>> no source data. It can be safely ignored. 
>>>
>>> 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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/a6dbe838-a328-4576-8c3f-ec6e1284a827n%40googlegroups.com.

Reply via email to