What makes you think this will save any space? Truncated or not, sqlite always stores a float as an 8-byte IEEE number.
Also, good data practice requires not messing with primary data. It will bite you somewhere down the road. -tkd On Thu, Mar 28, 2019 at 8:15 AM Martin <at3...@gmail.com> wrote: > Hi there! > > My archive database is target_unit = METRICWX and it contains a lot of > values with too much decimals. > For example: inTemp = 14.4086206896552 > To save space, I only need one decimal, so that weewx.sdb contains the > number 14.4 for inTemp. > In weewx.conf I tried: > [StdCalibrate] > [[Corrections]] > inTemp = round(inTemp,1) > > but then I get the error message: > **** File "/usr/share/weewx/weewx/engine.py", line 365, in __init__ > **** 'StdCalibrate', 'eval') > **** TypeError: expected a readable buffer object > **** Exiting. > > I have found out, that for example > inTemp = round(inTemp) and > inTemp = int(inTemp) > in weewx.conf work correct! But then I have no digit after the coma. > > So, any ideas? > > Springfeelings from Austra, > Martin > > -- > 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. > For more options, visit https://groups.google.com/d/optout. > -- 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. For more options, visit https://groups.google.com/d/optout.