Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

errors after upgrading from 1.3beta1 to 1.3 final #880

Open
mrneutron42 opened this issue Apr 21, 2023 Discussed in #879 · 10 comments
Open

errors after upgrading from 1.3beta1 to 1.3 final #880

mrneutron42 opened this issue Apr 21, 2023 Discussed in #879 · 10 comments

Comments

@mrneutron42
Copy link

mrneutron42 commented Apr 21, 2023

Discussed in #879

Originally posted by mrneutron42 April 20, 2023
OS: Ubuntu 22.10
weewx: 4.5.1
Belchertown: 1.3 final

Installing Belchertown 1.3 had no errors.

$ sudo ~/bin/wee_extension --install weewx-belchertown-release-1.3.tar.gz
Request to install 'weewx-belchertown-release-1.3.tar.gz'
Extracting from tar archive weewx-belchertown-release-1.3.tar.gz
Saving installer file to /home/weewx/bin/user/installer/Belchertown
Saved configuration dictionary. Backup copy at /home/weewx/weewx.conf.20230420131756
Finished installing extension 'weewx-belchertown-release-1.3.tar.gz'

After restoring my customized files skin.conf, index.html.tmpl, graphs.conf, index_radar.inc, I stopped & restarted weewx and got errors when wee_reports was called.

$ sudo systemctl stop weewx
$ sudo systemctl start weewx
$ sudo systemctl start weewx
$ ~/bin/wee_reports 
Using configuration file /home/weewx/weewx.conf
Generating for all time
Traceback (most recent call last):
  File "/home/weewx/bin/weewx/reportengine.py", line 196, in run
    obj.start()
  File "/home/weewx/bin/weewx/reportengine.py", line 281, in start
    self.run()
  File "/home/weewx/bin/weewx/cheetahgenerator.py", line 152, in run
    ngen = self.generate(gen_dict[section_name], self.gen_ts)
  File "/home/weewx/bin/weewx/cheetahgenerator.py", line 222, in generate
    ngen += self.generate(section[subsection], gen_ts)
  File "/home/weewx/bin/weewx/cheetahgenerator.py", line 222, in generate
    ngen += self.generate(section[subsection], gen_ts)
  File "/home/weewx/bin/weewx/cheetahgenerator.py", line 310, in generate
    searchList = self._getSearchList(encoding, timespan,
  File "/home/weewx/bin/weewx/cheetahgenerator.py", line 387, in _getSearchList
    searchList += obj.get_extension_list(timespan, db_lookup)
  File "/home/weewx/bin/user/belchertown.py", line 515, in get_extension_list
    radar_width_kiosk = self.generator.skin_dict["Extras"]["radar_width_kiosk"]
  File "/usr/lib/python3/dist-packages/configobj.py", line 554, in __getitem__
    val = dict.__getitem__(self, key)
KeyError: 'radar_width_kiosk'

Can anyone tell what is going wrong?
Is there a missing variable definition in the main weewx.conf file?

I found that if I re-install the 1.3beta1 version of Belchertown, and restart weewx, everything works again, without any errors.

$sudo ~/bin/wee_extension --install belchertown-1.3b1.zip
Request to install 'belchertown-1.3b1.zip'
Extracting from zip archive belchertown-1.3b1.zip
Saving installer file to /home/weewx/bin/user/installer/Belchertown
Saved configuration dictionary. Backup copy at /home/weewx/weewx.conf.20230420133856
Finished installing extension 'belchertown-1.3b1.zip'

Here's the [StdReport] section of my weewx.conf file:

[StdReport]
    
    # Where the skins reside, relative to WEEWX_ROOT
    SKIN_ROOT = skins
    
    # Where the generated reports should go, relative to WEEWX_ROOT
    HTML_ROOT = public_html
    
    # The database binding indicates which data should be used in reports.
    data_binding = wx_binding
    
    # Whether to log a successful operation
    log_success = True
    
    # Whether to log an unsuccessful operation
    log_failure = True
    
    # Each of the following subsections defines a report that will be run.
    # See the customizing guide to change the units, plot types and line
    # colors, modify the fonts, display additional sensor data, and other
    # customizations. Many of those changes can be made here by overriding
    # parameters, or by modifying templates within the skin itself.
    
    [[SeasonsReport]]
        # The SeasonsReport uses the 'Seasons' skin, which contains the
        # images, templates and plots for the report.
        skin = EricSeasons
        enable = false
    
    [[SmartphoneReport]]
        # The SmartphoneReport uses the 'Smartphone' skin, and the images and
        # files are placed in a dedicated subdirectory.
        skin = Smartphone
        enable = false
        HTML_ROOT = public_html/smartphone
    
    [[MobileReport]]
        # The MobileReport uses the 'Mobile' skin, and the images and files
        # are placed in a dedicated subdirectory.
        skin = Mobile
        enable = false
        HTML_ROOT = public_html/mobile
    
    [[StandardReport]]
        # This is the old "Standard" skin. By default, it is not enabled.
        skin = Standard
        enable = false
    
    [[Belchertown]]
        skin = Belchertown
        enable = true
        HTML_ROOT = public_html
        [[[Extras]]]
            belchertown_debug = 0
            belchertown_locale = auto
            webpage_autorefresh = 300000    #in milliseconds 
            reload_hook_images = 1
            reload_images_radar = 300    #in seconds
            site_title = Minnetonka WeeWX
            manifest_name = Minnetonka WeeWX
            manifest_short_name = WWX
            theme = auto    # automatically changes to the dark page theme at night
            theme_toggle_enabled = 1
            logo_image = /images/Minnetonka_M_cattails_100.jpg
            logo_image_dark = /images/Minnetonka_M_cattails_100_dark.jpg
            beaufort_category = 1
            radar_marker = 1
            radar_html = ""
            radar_html_dark = ""
            radar_width = 650
            radar_height = 360
            aeris_map = 0
            almanac_extras = 1
            
            #Arisweather info
            forecast_enabled = 1
            forecast_provider = aeris
            forecast_api_id = xxx
            forecast_api_secret = xxx
            forecast_units = us
            forecast_interval_hours = 24
            forecast_stale = 3540
            forecast_aeris_use_metar = 1
            forecast_lang = en
            forecast_alert_limit = 1
            
            # Highcharts settings
            highcharts_enabled = 1
            graph_page_show_all_button = 1
            graph_page_default_graphgroup = day
            highcharts_homepage_graphgroup = homepage
            highcharts_decimal = auto
            highcharts_thousands = auto
            
            # For help refer to the docs at https://github.com/poblabs/weewx-belchertown
            
            #--- General Options ---
            # belchertown_debug = 0
            # belchertown_locale = "auto"
            # theme = light
            # theme_toggle_enabled = 1
            # logo_image = ""
            # logo_image_dark = ""
            # site_title = "My Weather Website"
            # station_observations = "barometer","dewpoint","outHumidity","rainWithRainRate"
            # beaufort_categoty = 0
            # manifest_name = "My Weather Website"
            # manifest_short_name = "MWW"
            # aeris_map = 0
            # radar_html = ''   #  (default seems to center on your lat/lon)
            # radar_html_dark = None
            # radar_zoom = 8
            # radar_marker = 0
            # almanac_extras = 1
            # highcharts_enabled = 1
            # graph_page_show_all_button = 1
            # graph_page_default_graphgroup = "day"
            # highcharts_homepage_graphgroup = "day"
            # highcharts_decimal = "auto"
            # highcharts_thousands = "auto"
            # googleAnalyticsId = ""
            # pi_kiosk_bold = "false"
            # pi_theme = "auto"
            # webpage_autorefresh = 0
            # reload_hook_images = 0
            # reload_images_radar = 300
            # reload_images_hook_asi = -1
            # reload_images_hook_af = -1
            # reload_images_hook_as = -1
            # reload_images_hook_ac = -1
            # show_last_updated_alert = 0
            # last_updated_alert_threshold = 1800
            
            #--- Common Titles under Labels Section to Change ---
            # home_page_header = "My Station Weather Conditions"
            # graphs_page_header = "Weather Observation Graphs"
            # reports_page_header = "Weather Observation Reports"
            # records_page_header = "Weather Observation Records"
            # about_page_header = "About This Site"
            # powered_by = 'Observations are powered by a <a href="/about" target="_blank">Personal Weather Station</a>'
            # footer_copyright_text = "My Weather Website"
            # footer_disclaimer_text = "Never make important decisions based on info from this website."
            
            #--- MQTT Websockets (for Real Time Streaming) Options ---
            # mqtt_websockets_enabled = 0
            # mqtt_websockets_host = ""
            # mqtt_websockets_port = 8080
            # mqtt_websockets_ssl	= 0
            # mqtt_websockets_topic = ""
            # disconnect_live_website_visitor = 1800000
            
            #--- Forecast Options ---
            # forecast_enabled = 0
            # forecast_provider = "aeris"
            # forecast_api_id = ""
            # forecast_api_secret = ""
            # forecast_units = "us"
            # forecast_lang = "en"
            # forecast_stale = 3540
            # forecast_aeris_use_metar = 1
            # forecast_interval_hours = 24
            # forecast_alert_enabled = 0
            # forecast_alert_limit = 1
            # forecast_show_daily_forecast_link = 0
            # forecast_daily_forecast_link = ""
            # aqi_enabled = 0
            # aqi_location_enabled = 0
            
            #--- Earthquake Options ---
            # earthquake_enabled = 0
            # earthquake_maxradiuskm = 1000
            # earthquake_stale = 10740
            # earthquake_server = USGS
            # geonet_mmi = 4
            
            #--- Social Options ---
            # facebook_enabled = 0
            # twitter_enabled = 0
            # twitter_hashtags = "weewx #weather"
            # social_share_html = ""
            # twitter_text = "Check out my website: My Weather Website Weather Conditions"
            # twitter_owner = "YourTwitterUsernameHere"
            # twitter_hashtag = "weewx #weather"
            
            #-------------------------------------------------------------
            #---
            #--- python's ConfigObj has a limitation in how it processes
            #--- comments, so we need to define an 'unused' variable below
            #--- to ensure that this whole stanza makes it into weewx.conf
            #--- 
            #--- please ignore the following 'unused' variable
            #---
            #-------------------------------------------------------------
            work_around_ConfigObj_limitations = true
@tim273
Copy link

tim273 commented Apr 28, 2023

I'm having a very similar issue updating from 1.2 to 1.3:

Apr 28 09:55:38 weewx weewx[953413] ERROR weewx.reportengine: Caught unrecoverable exception in generator 'weewx.cheetahgenerator.CheetahGenerator'
Apr 28 09:55:38 weewx weewx[953413] ERROR weewx.reportengine:         ****  'radar_width'
Apr 28 09:55:38 weewx weewx[953413] ERROR weewx.reportengine:         ****  Traceback (most recent call last):
Apr 28 09:55:38 weewx weewx[953413] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 197, in run
Apr 28 09:55:38 weewx weewx[953413] ERROR weewx.reportengine:         ****      obj.start()
Apr 28 09:55:38 weewx weewx[953413] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 385, in start 
Apr 28 09:55:38 weewx weewx[953413] ERROR weewx.reportengine:         ****      self.run()
Apr 28 09:55:38 weewx weewx[953413] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/cheetahgenerator.py", line 169, in run
Apr 28 09:55:38 weewx weewx[953413] ERROR weewx.reportengine:         ****      ngen =self.generate(gen_dict[section_name], section_name, self.gen_ts)
Apr 28 09:55:38 weewx weewx[953413] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/cheetahgenerator.py", line 229, in generate
Apr 28 09:55:38 weewx weewx[953413] ERROR weewx.reportengine:         ****      ngen += self.generate(section[subsection], subsection, gen_ts)
Apr 28 09:55:38 weewx weewx[953413] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/cheetahgenerator.py", line 229, in generate
Apr 28 09:55:38 weewx weewx[953413] ERROR weewx.reportengine:         ****      ngen += self.generate(section[subsection], subsection, gen_ts)
Apr 28 09:55:38 weewx weewx[953413] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/cheetahgenerator.py", line 321, in generate
Apr 28 09:55:38 weewx weewx[953413] ERROR weewx.reportengine:         ****      searchList = self._getSearchList(encoding, timespan,
Apr 28 09:55:38 weewx weewx[953413] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/cheetahgenerator.py", line 415, in _getSearchList
Apr 28 09:55:38 weewx weewx[953413] ERROR weewx.reportengine:         ****      search_list += obj.get_extension_list(timespan, db_lookup)
Apr 28 09:55:38 weewx weewx[953413] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/user/belchertown.py", line 458, in get_extension_list
Apr 28 09:55:38 weewx weewx[953413] ERROR weewx.reportengine:         ****      # Find the number of decimals to round to
Apr 28 09:55:38 weewx weewx[953413] ERROR weewx.reportengine:         ****    File "/usr/lib/python3/dist-packages/configobj.py", line 554, in __getitem__
Apr 28 09:55:38 weewx weewx[953413] ERROR weewx.reportengine:         ****      val = dict.__getitem__(self, key)
Apr 28 09:55:38 weewx weewx[953413] ERROR weewx.reportengine:         ****  KeyError: 'radar_width'
Apr 28 09:55:38 weewx weewx[953413] ERROR weewx.reportengine:         ****  Generator terminated

@c0r3dump3d
Copy link

Hi, I have the same error after update from 1.2 to 1.3:

May  3 10:05:18 meteoot weewx[19554] ERROR weewx.reportengine: Caught unrecoverable exception in generator 'weewx.cheetahgenerator.CheetahGenerator'
May  3 10:05:18 meteoot weewx[19554] ERROR weewx.reportengine:         ****  'radar_width'
May  3 10:05:18 meteoot weewx[19554] ERROR weewx.reportengine:         ****  Traceback (most recent call last):
May  3 10:05:18 meteoot weewx[19554] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 197, in run
May  3 10:05:18 meteoot weewx[19554] ERROR weewx.reportengine:         ****      obj.start()
May  3 10:05:18 meteoot weewx[19554] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 385, in start
May  3 10:05:18 meteoot weewx[19554] ERROR weewx.reportengine:         ****      self.run()
May  3 10:05:18 meteoot weewx[19554] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/cheetahgenerator.py", line 169, in run
May  3 10:05:18 meteoot weewx[19554] ERROR weewx.reportengine:         ****      ngen = self.generate(gen_dict[section_name], section_name, self.gen_ts)
May  3 10:05:18 meteoot weewx[19554] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/cheetahgenerator.py", line 229, in generate
May  3 10:05:18 meteoot weewx[19554] ERROR weewx.reportengine:         ****      ngen += self.generate(section[subsection], subsection, gen_ts)
May  3 10:05:18 meteoot weewx[19554] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/cheetahgenerator.py", line 229, in generate
May  3 10:05:18 meteoot weewx[19554] ERROR weewx.reportengine:         ****      ngen += self.generate(section[subsection], subsection, gen_ts)
May  3 10:05:18 meteoot weewx[19554] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/cheetahgenerator.py", line 325, in generate
May  3 10:05:18 meteoot weewx[19554] ERROR weewx.reportengine:         ****      _filename))
May  3 10:05:18 meteoot weewx[19554] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/cheetahgenerator.py", line 415, in _getSearchList
May  3 10:05:18 meteoot weewx[19554] ERROR weewx.reportengine:         ****      search_list += obj.get_extension_list(timespan, db_lookup)
May  3 10:05:18 meteoot weewx[19554] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/user/belchertown.py", line 458, in get_extension_list
May  3 10:05:18 meteoot weewx[19554] ERROR weewx.reportengine:         ****      radar_width = self.generator.skin_dict["Extras"]["radar_width"]
May  3 10:05:18 meteoot weewx[19554] ERROR weewx.reportengine:         ****    File "/usr/lib/python3/dist-packages/configobj.py", line 554, in __getitem__
May  3 10:05:18 meteoot weewx[19554] ERROR weewx.reportengine:         ****      val = dict.__getitem__(self, key)
May  3 10:05:18 meteoot weewx[19554] ERROR weewx.reportengine:         ****  KeyError: 'radar_width'
May  3 10:05:18 meteoot weewx[19554] ERROR weewx.reportengine:         ****  Generator terminated

@c0r3dump3d
Copy link

I found the solution, because I have recycled the skin.conf file from 1.2 to 1.3 version it's seems you can insert this lines in skin.conf (1.2 version):

 radar_html = ""
  radar_html_dark = ""
  radar_width = 650
  radar_height = 360

and delete this line:

radar_marker = 1
and insert

# This is the display of the kiosk page which is kiosk.html
    radar_html_kiosk = ""
    radar_width_kiosk = 490
    radar_height_kiosk = 362
    mqtt_websockets_host_kiosk = ""
    mqtt_websockets_port_kiosk = ""
    mqtt_websockets_ssl_kiosk = ""
    forecast_interval_hours_kiosk = 24
    aqi_enabled_kiosk = 0

@mrneutron42
Copy link
Author

I believe the Belchertown settings in the weewx.conf file override the settings listed in the skin.conf file?
So, if you we put the correct settings in weewx.conf, it should work fine.

I wonder why the "radar_marker = 1" is a problem?
I note that the suggested Belchertown settings have # radar_marker=0
I wonder if Belchertown 1.3 works with "radar_marker=0"?

@stale
Copy link

stale bot commented Aug 10, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Issue has not had activity label Aug 10, 2023
@stale stale bot removed the stale Issue has not had activity label Sep 7, 2023
@ChrisM510
Copy link

I am having similar issues now after trying to upgrade from 1.3b1 to 1.3.1. In my skin.conf file, I do not have "radar_marker = 1" and all of the suggested lines to add are already there. Weewx runs, but it is only grabbing data and putting it in the database...the webpage is not updating at all and I cannot run wee_reports.

Output of wee_reports:
pi@WEEWX:~ $ sudo wee_reports
Using configuration file /etc/weewx/weewx.conf
Generating for all time
Traceback (most recent call last):
File "/usr/share/weewx/weewx/reportengine.py", line 204, in run
obj.start()
File "/usr/share/weewx/weewx/reportengine.py", line 300, in start
self.run()
File "/usr/share/weewx/user/belchertown.py", line 2771, in run
special_target_unit
File "/usr/share/weewx/user/belchertown.py", line 3737, in get_observation_data
% (binding, obs_lookup, e)
Warning: Error trying to use database binding wx_binding to graph observation outTemp. Error was: 'module' object has no attribute 'xtypes'.

Ideas? I could really use some help...I know just enough Linux to be dangerous, so consider me to be a noob, please. Thanks in advance!!!

Copy link

stale bot commented Dec 15, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Issue has not had activity label Dec 15, 2023
@mrneutron42
Copy link
Author

This is still not fixed. I don't know what is wrong.

@stale stale bot removed the stale Issue has not had activity label Dec 17, 2023
Copy link

stale bot commented Mar 17, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Issue has not had activity label Mar 17, 2024
@mrneutron42
Copy link
Author

This is still not fixed.

@stale stale bot removed the stale Issue has not had activity label Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants