Just to wrap this up. Python 3.3 and later raises an OverflowError rather than a ValueError if datetime.date.fromtimestamp() encounters a timestamp that is out of range for values supported by the platform C localtime() or gmtime() functions. Whilst wee_import was developed on python 3.5, this was using a non-armhf 64 bit machine and hence did not strike the same range of values. A quick check on a RPi3 showed the same OverflowError behaviour. Interesting error and easily fixed. Fixed at commit 5355bfb <https://github.com/weewx/weewx/commit/5355bfbb3ba1d4e6316df06bf360880d57eace4f>.
Gary On Friday, 21 February 2020 02:14:17 UTC+10, Nicolas CUVILLIER wrote: > > 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 > > -- 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/84882be4-bdb6-42ea-b8ff-9254ffce7c16%40googlegroups.com.
