I got an error in wee_import in the bloc
if obs == 'epoch':
try:
_date = datetime.date.fromtimestamp(_flat_record['epoch'])
except ValueError:
_flat_record['epoch'] = _flat_record['epoch'] // 1000

*The error was:*
Traceback (most recent call last):
  File "/home/weewx/bin/wee_import", line 896, in <module>
    main()
  File "/home/weewx/bin/wee_import", line 826, in main
    source_obj.run()
  File "/home/weewx/bin/weeimport/weeimport.py", line 367, in run
    _raw_data = self.getRawData(period)
  File "/home/weewx/bin/weeimport/wuimport.py", line 299, in getRawData
    _date = datetime.date.fromtimestamp(_flat_record['epoch'])
OverflowError: timestamp out of range for platform time_t

(I am running wee_import --from=2015-06-25 --to=2015-12-31)

*I removed the bloc* and replace with the line in the expect branch:
_flat_record['epoch'] = _flat_record['epoch'] // 100

I am not sure about exactly the consequences of what I did, the only point 
is
that I forced the expect because of an error, and remove the blocking error
 
Does it make sense, or will my data be corrupted ?

Is there a better way to have this fixed ?

I can provide in a personal message (email?) my api_key if you want to 
reproduce
Nicolas

======================
Le jeudi 20 février 2020 19:12:21 UTC+4, Thomas Keffer a écrit :
>
> No, I don't. Gary wrote the wee_import utility. 
>
> There's nothing to be lost by just trying it!
>
> On Thu, Feb 20, 2020 at 6:54 AM Nicolas CUVILLIER <[email protected] 
> <javascript:>> wrote:
>
>> Thanks Thomas
>> Probably I made a mistake during the upgrade.
>>
>> I removed weewx, and re-install directly the v4.0.b12, and it just work 
>> :-)
>>
>> I have 3 years more or less to import. Is it better to do it in one shot, 
>> or by smaller part, like every six months ?
>> Do you have any experience on this ?
>>
>> Thanks
>> Nicolas
>>
>> -- 
>> 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] <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/weewx-user/97428b0f-073d-4320-afc9-0e668ca17d15%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/weewx-user/97428b0f-073d-4320-afc9-0e668ca17d15%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
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/8d0f42b8-854f-42ae-8403-e7c2176d3843%40googlegroups.com.

Reply via email to