Luc, interesting update. Thanks for the information. I don't think 
non-standard database types are common? The script is looking for 
archive_sqlite or archive_mysql - which so far has covered everyone. 

I don't know what vpro_mysql is. If it's mysql, why don't you use the 
archive_mysql binding? Is this how you're able to have multiple databases 
per weewx instance?



On Sunday, February 17, 2019 at 11:30:49 AM UTC-5, Luc Heijst wrote:
>
> Hi Pat,
>
> I installed Belchertown Skin Version: 0.9rc6 from scratch (no update) in 
> weewx 3.9.1.
>
> At first the generation of the skin crashed with the following error:
> Feb 17 12:12:25 pi21 vpro[9234]: cheetahgenerator: Generated 4 files for 
> report Highcharts_Belchertown in 122.54 seconds
> Feb 17 12:12:25 pi21 vpro[9234]: copygenerator: copied 0 files to 
> /var/www/html/vpro/data/weewx/belchertown
> Feb 17 12:12:25 pi21 vpro[9234]: reportengine: Running report 'Belchertown'
> Feb 17 12:12:25 pi21 vpro[9234]: reportengine: Found configuration file 
> /home/weewx/skins/Belchertown/skin.conf for report 'Belchertown'
> Feb 17 12:12:25 pi21 vpro[9234]: cheetahgenerator: using search list 
> ['weewx.cheetahgenerator.Almanac', 'weewx.cheetahgenerator.Station', 
> 'weewx.cheetahgenerator.Current', 'weewx.cheetahgenerator.Stats', 
> 'weewx.cheetahgenerator.UnitInfo', 'weewx.cheetahgenerator.Extras', 
> 'user.belchertown.getData']
> Feb 17 12:12:25 pi21 vpro[9234]: manager: Daily summary version is 2.0
> Feb 17 12:12:25 pi21 vpro[9234]: Belchertown Extension: version 0.9rc6
> Feb 17 12:12:26 pi21 vpro[9234]: reportengine: Caught unrecoverable 
> exception in generator 'weewx.cheetahgenerator.CheetahGenerator'
> Feb 17 12:12:26 pi21 vpro[9234]:         ****  local variable 
> 'year_rainiest_month_sql' referenced before assignment
> Feb 17 12:12:26 pi21 vpro[9234]:         ****  Traceback (most recent call 
> last):
> Feb 17 12:12:26 pi21 vpro[9234]:         ****    File 
> "/home/weewx/bin/weewx/reportengine.py", line 204, in run
> Feb 17 12:12:26 pi21 vpro[9234]:         ****      obj.start()
> Feb 17 12:12:26 pi21 vpro[9234]:         ****    File 
> "/home/weewx/bin/weewx/reportengine.py", line 300, in start
> Feb 17 12:12:26 pi21 vpro[9234]:         ****      self.run()
> Feb 17 12:12:26 pi21 vpro[9234]:         ****    File 
> "/home/weewx/bin/weewx/cheetahgenerator.py", line 160, in run
> Feb 17 12:12:26 pi21 vpro[9234]:         ****      ngen = 
> self.generate(gen_dict[section_name], self.gen_ts)
> Feb 17 12:12:26 pi21 vpro[9234]:         ****    File 
> "/home/weewx/bin/weewx/cheetahgenerator.py", line 234, in generate
> Feb 17 12:12:26 pi21 vpro[9234]:         ****      ngen += 
> self.generate(section[subsection], gen_ts)
> Feb 17 12:12:26 pi21 vpro[9234]:         ****    File 
> "/home/weewx/bin/weewx/cheetahgenerator.py", line 234, in generate
> Feb 17 12:12:26 pi21 vpro[9234]:         ****      ngen += 
> self.generate(section[subsection], gen_ts)
> Feb 17 12:12:26 pi21 vpro[9234]:         ****    File 
> "/home/weewx/bin/weewx/cheetahgenerator.py", line 322, in generate
> Feb 17 12:12:26 pi21 vpro[9234]:         ****      default_binding)
> Feb 17 12:12:26 pi21 vpro[9234]:         ****    File 
> "/home/weewx/bin/weewx/cheetahgenerator.py", line 374, in _getSearchList
> Feb 17 12:12:26 pi21 vpro[9234]:         ****      searchList += 
> obj.get_extension_list(timespan, db_lookup)
> Feb 17 12:12:26 pi21 vpro[9234]:         ****    File 
> "/home/weewx/bin/user/belchertown.py", line 228, in get_extension_list
> Feb 17 12:12:26 pi21 vpro[9234]:         ****      
> year_rainiest_month_query = wx_manager.getSql( year_rainiest_month_sql )
> Feb 17 12:12:26 pi21 vpro[9234]:         ****  UnboundLocalError: local 
> variable 'year_rainiest_month_sql' referenced before assignment
> Feb 17 12:12:26 pi21 vpro[9234]:         ****  Generator terminated
>
> This is a result of my non-standard weewx configuration.
> Differences:
> - startup file is weewx_vpro.conf instead of weewx.conf
> - [StdArchive] data_binding = vpro_binding instead of wx_binding
>     [[vpro_binding]]
>         database = vpro_mysql
>         table_name = archive
>         manager = weewx.wxmanager.WXDaySummaryManager
>         schema = schemas.wview.schema
> Because of the non-standard binding some parts of belchertown.py are not 
> executed.
> - line 212 in belchertown.py should be (in my case):
>          if dbtype == "vpro_sqlite":
>   instead of:
>          if dbtype == "weewx_sqlite":
> - line 219 in belchertown.py should be (in my case):
>          if dbtype == "vpro_mysql":
>   instead of:
>          if dbtype == "weewx_mysql":
>
> After I have changed lines 212 and 219 in belchertow.py the skin was 
> generated succesfully.
>
> Cheers, Luc
>

-- 
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.

Reply via email to