Sorry Im a little confused here. If as an example you tried to add something new into weewx.sdb by using import schemas.wview schema_extended = schemas.wview.schema + [('whateveryoulikehere', 'REAL')] in the extension.py file with manager = weewx.manager.DaySummaryManager I can see people falling into a bit of a black hole as looking back in the logs May 27 20:10:16 raspberrypi weewx[1464] ERROR weewx.cheetahgenerator: **** File "_home_weewx_skins_Standard_NOAA_NOAA__Y_txt_tmpl.py", line 862, in respond May 27 20:10:16 raspberrypi weewx[1464] ERROR weewx.cheetahgenerator: **** NameMapper.NotFound: cannot find 'count' while searching for 'month.wind.count.raw' and it didn't like $day.wind.max from $day.wind.gustdir.ordinal_compass at $day.wind.maxtime So how can you add to weewx.sdb without it changing the structure and causing these errors Phil
On Thursday, May 28, 2020 at 12:06:30 AM UTC+1, Phil Owers wrote: > > Have just tried to add avg_distance and lightning_strikes to the > weewx.sdb. schema by adding > import schemas.wview > schema_extended = schemas.wview.schema + [('avg_distance', > 'REAL'),('lightning_strikes', 'REAL')] > in the extension.py file > and in the weewx.conf > changed schema = schemas.wview_extended.schema > to schema = user.extensions.schema_extended > then > sudo ./bin/wee_database weewx.conf --reconfigure > > The new weewx.sdb was produced and so I then did --rebuild-daily. > Restarted weewx and started getting a failure with $day.wind.max and also > the following was produced in the log with > May 27 19:20:11 raspberrypi weewx[529] INFO user.rtgd: rtgdthread: > **** data = self.calculate(cached_packet) > May 27 19:20:11 raspberrypi weewx[529] INFO user.rtgd: rtgdthread: **** > File "/home/weewx/bin/user/rtgd.py", line 1926, in calculate > May 27 19:20:11 raspberrypi weewx[529] INFO user.rtgd: rtgdthread: > **** wgust_tm_vt = ValueTuple(self.day_stats['wind'].max, > May 27 19:20:11 raspberrypi weewx[529] INFO user.rtgd: rtgdthread: **** > KeyError: 'wind' > > Had a look at the old and new weew.sdb and in the database file structure > the tables had gone from 114 Table Schema in the original to 54 Table > Schema after I had done the above change with daily_archive_wind missing > with lots of others. > Reverted back to the original weewx.sdb and it was Ok again. > Im using weewx Ver 4.1 > Just wondered if there was a different way of doing the above since > version 4 > Thanks for any help > Phil > -- 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/a83fb07a-a361-42d2-9927-9318db92dc01%40googlegroups.com.