Hmm, something is not right in your database. This will seem a roundabout way to do things but could you try dropping and rebuilding the daily summaries before running --update. The sequence of commands will be:
1. stop WeeWX 2. drop the daily summaries: $ wee_database --drop-daily 3. rebuild the daily summaries: $ wee_database --rebuild-daily 4. apply the database updates: $ wee_database --update Gary On Tuesday, 22 September 2020 at 15:01:01 UTC+10 [email protected] wrote: > Thanks Gary, > > I did as suggested, and received the following: > > Using configuration file /etc/weewx/weewx.conf > Using database binding 'wx_binding', which is bound to database > 'archive_mysql' > The update process does not affect archive data, but does alter the > database. > Continue (y/n)? y > Preparing Interval Weighting Fix... > Daily summary tables are at version None > Calculating interval weights... > Traceback (most recent call last): > File "/usr/share/weewx/wee_database", line 974, in <module> > main() > File "/usr/share/weewx/wee_database", line 154, in main > update(config_dict, db_binding, options) > File "/usr/share/weewx/wee_database", line 584, in update > weight_obj.run() > File "/usr/share/weewx/weecfg/database.py", line 426, in run > self.do_fix(_next_day_to_patch_ts) > File "/usr/share/weewx/weecfg/database.py", line 483, in do_fix > _weight = self.get_interval(_day_span) * 60 > File "/usr/share/weewx/weecfg/database.py", line 580, in get_interval > return _row[0] > TypeError: 'NoneType' object is not subscriptable > > > On Tuesday, 22 September 2020 at 1:34:12 pm UTC+10 gjr80 wrote: > >> Hi, >> >> I'm sure the guidance you received was well intentioned but it is nothing >> more than papering over the cracks and the issue will come back to bite in >> the future. In particular, the next time you upgrade WeeWX you will be back >> in the same predicament, better to fix the issue properly. I suggest you >> try the following: >> >> 1. stop WeeWX >> 2. revert the change you made to manager.py >> 3. run wee_database >> <http://weewx.com/docs/utilities.htm#wee_database_utility> with the >> --update action: >> >> $ wee_database --update >> >> 4. restart WeeWX >> >> That should fix the problem, if not post the error trace from the log. >> >> Gary >> On Tuesday, 22 September 2020 at 13:05:19 UTC+10 [email protected] >> wrote: >> >>> Had a look around some existing posts regarding similar issues and with >>> some guidance from friends smarter than me, ended up changing this line >>> (1160): >>> >>> weight = 60.0 * record['interval'] if self.version >= '2.0' else 1.0 >>> >>> to >>> >>> weight = 60.0 * record['interval'] if self.version is not None and >>> self.version >= '2.0' else 1.0 >>> >>> and it's working ok now... >>> >>> >>> On Tuesday, 22 September 2020 at 12:08:27 pm UTC+10 Andrew H wrote: >>> >>>> Hi all, >>>> >>>> Aweosmse software, have been using it since about 2015 without issue! >>>> >>>> I'm running a Davis Vantage Vue w/usb connected to a raspberry pi. >>>> >>>> I have just done a clean install of raspbian and have attempted an >>>> install with 4.1.1 from apt repo using python3 but I'm hitting an error >>>> when it tries to add entries to the archive. I export to mysql and from >>>> looking into the error it appears to be a python3 thing... >>>> >>>> Error: >>>> https://hastebin.itsgottabe.red/xiwabocake.md >>>> >>>> Config: >>>> https://hastebin.itsgottabe.red/adavojemix.coffeescript >>>> >>>> >>>> >>>> cheers >>>> Andrew >>>> >>>> >>>> >>>> -- 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/26f6df8f-c8f0-43a3-893d-b2d5e0ac0564n%40googlegroups.com.
