gjr80 / weewx-saratoga Goto Github PK
View Code? Open in Web Editor NEWA WeeWX extension to support the Saratoga Weather Website Templates
License: GNU Affero General Public License v3.0
A WeeWX extension to support the Saratoga Weather Website Templates
License: GNU Affero General Public License v3.0
Here's the /var/log/syslog entries:
Apr 26 06:45:19 TRP3WX weewx[12000] INFO weewx.cheetahgenerator: Generated 14 files for report StandardReport in 2.21 seconds
Apr 26 06:45:20 TRP3WX weewx[12000] INFO weewx.imagegenerator: Generated 12 images for report StandardReport in 0.70 seconds
Apr 26 06:45:20 TRP3WX weewx[12000] INFO weewx.reportengine: Copied 0 files to /var/www/html/weewx
Apr 26 06:45:20 TRP3WX weewx[12000] ERROR weewx.cheetahgenerator: Generate failed with exception '<class 'TypeError'>'
Apr 26 06:45:20 TRP3WX weewx[12000] ERROR weewx.cheetahgenerator: **** Ignoring template /etc/weewx/skins/WEEWXtags/WEEWXtags.php.tmpl
Apr 26 06:45:20 TRP3WX weewx[12000] ERROR weewx.cheetahgenerator: **** Reason: 'NoneType' object is not subscriptable
Apr 26 06:45:20 TRP3WX weewx[12000] ERROR weewx.cheetahgenerator: **** Traceback (most recent call last):
Apr 26 06:45:20 TRP3WX weewx[12000] ERROR weewx.cheetahgenerator: **** File "/usr/share/weewx/weewx/cheetahgenerator.py", line 326, in generate
Apr 26 06:45:20 TRP3WX weewx[12000] ERROR weewx.cheetahgenerator: **** unicode_string = compiled_template.respond()
Apr 26 06:45:20 TRP3WX weewx[12000] ERROR weewx.cheetahgenerator: **** File "_etc_weewx_skins_WEEWXtags_WEEWXtags_php_tmpl.py", line 596, in respond
Apr 26 06:45:20 TRP3WX weewx[12000] ERROR weewx.cheetahgenerator: **** File "/usr/share/weewx/weewx/tags.py", line 565, in __getattr__
Apr 26 06:45:20 TRP3WX weewx[12000] ERROR weewx.cheetahgenerator: **** vt = weewx.xtypes.get_scalar(obs_type, self.record, db_manager)
Apr 26 06:45:20 TRP3WX weewx[12000] ERROR weewx.cheetahgenerator: **** File "/usr/share/weewx/weewx/xtypes.py", line 73, in get_scalar
Apr 26 06:45:20 TRP3WX weewx[12000] ERROR weewx.cheetahgenerator: **** return xtype.get_scalar(obs_type, record, db_manager)
Apr 26 06:45:20 TRP3WX weewx[12000] ERROR weewx.cheetahgenerator: **** File "/usr/share/weewx/user/wsxtypes.py", line 53, in get_scalar
Apr 26 06:45:20 TRP3WX weewx[12000] ERROR weewx.cheetahgenerator: **** return getattr(self, 'calc_%s' % obs_type)(obs_type, record, db_manager)
Apr 26 06:45:20 TRP3WX weewx[12000] ERROR weewx.cheetahgenerator: **** File "/usr/share/weewx/user/wsxtypes.py", line 219, in calc_Easter
Apr 26 06:45:20 TRP3WX weewx[12000] ERROR weewx.cheetahgenerator: **** _year = datetime.date.fromtimestamp(record['dateTime']).year
Apr 26 06:45:20 TRP3WX weewx[12000] ERROR weewx.cheetahgenerator: **** TypeError: 'NoneType' object is not subscriptable
Apr 26 06:45:20 TRP3WX weewx[12000] INFO weewx.cheetahgenerator: Generated 0 files for report WEEWXtagsReport in 0.50 seconds
Apr 26 06:45:21 TRP3WX weewx[12000] INFO weewx.imagegenerator: Generated 9 images for report WEEWXtagsReport in 0.54 seconds
Apr 26 06:45:21 TRP3WX weewx[12000] INFO user.stackedwindrose: Generated 1 images for WEEWXtagsReport in 0.10 seconds
Apr 26 06:45:22 TRP3WX weewx[12000] ERROR weewx.cheetahgenerator: Generate failed with exception '<class 'TypeError'>'
Apr 26 06:45:22 TRP3WX weewx[12000] ERROR weewx.cheetahgenerator: **** Ignoring template /etc/weewx/skins/Clientraw/clientrawextra.txt.tmpl
Apr 26 06:45:22 TRP3WX weewx[12000] ERROR weewx.cheetahgenerator: **** Reason: argument of type 'NoneType' is not iterable
Apr 26 06:45:22 TRP3WX weewx[12000] ERROR weewx.cheetahgenerator: **** Traceback (most recent call last):
Apr 26 06:45:22 TRP3WX weewx[12000] ERROR weewx.cheetahgenerator: **** File "/usr/share/weewx/weewx/cheetahgenerator.py", line 326, in generate
Apr 26 06:45:22 TRP3WX weewx[12000] ERROR weewx.cheetahgenerator: **** unicode_string = compiled_template.respond()
Apr 26 06:45:22 TRP3WX weewx[12000] ERROR weewx.cheetahgenerator: **** File "_etc_weewx_skins_Clientraw_clientrawextra_txt_tmpl.py", line 2353, in respond
Apr 26 06:45:22 TRP3WX weewx[12000] ERROR weewx.cheetahgenerator: **** File "/usr/share/weewx/weewx/tags.py", line 565, in __getattr__
Apr 26 06:45:22 TRP3WX weewx[12000] ERROR weewx.cheetahgenerator: **** vt = weewx.xtypes.get_scalar(obs_type, self.record, db_manager)
Apr 26 06:45:22 TRP3WX weewx[12000] ERROR weewx.cheetahgenerator: **** File "/usr/share/weewx/weewx/xtypes.py", line 73, in get_scalar
Apr 26 06:45:22 TRP3WX weewx[12000] ERROR weewx.cheetahgenerator: **** return xtype.get_scalar(obs_type, record, db_manager)
Apr 26 06:45:22 TRP3WX weewx[12000] ERROR weewx.cheetahgenerator: **** File "/usr/share/weewx/user/wsxtypes.py", line 53, in get_scalar
Apr 26 06:45:22 TRP3WX weewx[12000] ERROR weewx.cheetahgenerator: **** return getattr(self, 'calc_%s' % obs_type)(obs_type, record, db_manager)
Apr 26 06:45:22 TRP3WX weewx[12000] ERROR weewx.cheetahgenerator: **** File "/usr/share/weewx/user/wsxtypes.py", line 162, in calc_cbi
Apr 26 06:45:22 TRP3WX weewx[12000] ERROR weewx.cheetahgenerator: **** if 'outTemp' not in record and 'outHumidity' not in record:
Apr 26 06:45:22 TRP3WX weewx[12000] ERROR weewx.cheetahgenerator: **** TypeError: argument of type 'NoneType' is not iterable
Apr 26 06:45:23 TRP3WX weewx[12000] INFO weewx.cheetahgenerator: Generated 2 files for report ClientrawReport in 2.33 seconds
Apr 26 06:45:27 TRP3WX weewx[12000] INFO weewx.reportengine: ftpgenerator: Ftp'd 2 files in 3.14 seconds
The error is persistent.. every Archive cycle.
weewx crashed this morning, and the error seems persistent:
May 5 06:44:44 TRP3WX weewx[29126] INFO weewx.engine: Main loop exiting. Shutting engine down.
May 5 06:44:44 TRP3WX weewx[29126] INFO weewx.engine: Shutting down StdReport thread
May 5 06:44:44 TRP3WX weewx[29126] CRITICAL __main__: Caught unrecoverable exception:
May 5 06:44:44 TRP3WX weewx[29126] CRITICAL __main__: **** 'pressure'
May 5 06:44:44 TRP3WX weewx[29126] CRITICAL __main__: **** Traceback (most recent call last):
May 5 06:44:44 TRP3WX weewx[29126] CRITICAL __main__: **** File "/usr/share/weewx/weewxd", line 157, in main
May 5 06:44:44 TRP3WX weewx[29126] CRITICAL __main__: **** engine.run()
May 5 06:44:44 TRP3WX weewx[29126] CRITICAL __main__: **** File "/usr/share/weewx/weewx/engine.py", line 210, in run
May 5 06:44:44 TRP3WX weewx[29126] CRITICAL __main__: **** self.dispatchEvent(weewx.Event(weewx.NEW_LOOP_PACKET, packet=packet))
May 5 06:44:44 TRP3WX weewx[29126] CRITICAL __main__: **** File "/usr/share/weewx/weewx/engine.py", line 245, in dispatchEvent
May 5 06:44:44 TRP3WX weewx[29126] CRITICAL __main__: **** callback(event)
May 5 06:44:44 TRP3WX weewx[29126] CRITICAL __main__: **** File "/usr/share/weewx/weewx/wxservices.py", line 98, in new_loop_packet
May 5 06:44:44 TRP3WX weewx[29126] CRITICAL __main__: **** self.do_calculations(event.packet, self.loop_calc_dict)
May 5 06:44:44 TRP3WX weewx[29126] CRITICAL __main__: **** File "/usr/share/weewx/weewx/wxservices.py", line 123, in do_calculations
May 5 06:44:44 TRP3WX weewx[29126] CRITICAL __main__: **** new_value = weewx.xtypes.get_scalar(obs_type, data_dict, self.db_manager)
May 5 06:44:44 TRP3WX weewx[29126] CRITICAL __main__: **** File "/usr/share/weewx/weewx/xtypes.py", line 73, in get_scalar
May 5 06:44:44 TRP3WX weewx[29126] CRITICAL __main__: **** return xtype.get_scalar(obs_type, record, db_manager)
May 5 06:44:44 TRP3WX weewx[29126] CRITICAL __main__: **** File "/usr/share/weewx/user/wsxtypes.py", line 53, in get_scalar
May 5 06:44:44 TRP3WX weewx[29126] CRITICAL __main__: **** return getattr(self, 'calc_%s' % obs_type)(obs_type, record, db_manager)
May 5 06:44:44 TRP3WX weewx[29126] CRITICAL __main__: **** File "/usr/share/weewx/user/wsxtypes.py", line 66, in calc_wet_bulb
May 5 06:44:44 TRP3WX weewx[29126] CRITICAL __main__: **** if record['outTemp'] is not None and record['pressure'] is not None and record['outHumidity'] is not None:
May 5 06:44:44 TRP3WX weewx[29126] CRITICAL __main__: **** KeyError: 'pressure'
May 5 06:44:44 TRP3WX weewx[29126] CRITICAL __main__: **** Exiting.
Help??
If possible, it would be really nice to offer a selection of units to use for the initial configuration of WEEWXtags at installation time.
This would apply to temperature, windspeed, barometer, rain, height, distance
USA = 'F,mph,inHg,in,feet,miles'
SI = 'C,km/h,hPa,mm,meter,km'
UK= 'C,mph,mb,mm,meter,miles'
SI2 = 'C,m/s,hPa,mm,meter,km'
To have that set by the install.py script at installation would be a big help in getting the WEEWXtags off to a great start without manual editing of the skin specification.
I installed an additional temperature sensor, but the value does not show in clientraw.txt. There (in clientraw.txt) at position 20 there is a value of "-100" instead of the current value. How can I fix this?
Using the clientraw.txt.tmpl from the 2.1.3 weewx-wd distribution results in some timestamps that are 'hh:mm:ss AM|PM' and should be either 'hh:mm:ss_AM}PM' in format. The extra space before AM|PM throws off the parsing of clientraw.txt which is done by a split to array on ' '.
See direct output at https://saratoga-weather.org/weewx/WD/clientraw.txt
WEEWXtags.php.tmpl
used the legacy WeeWX-WD testtags.php.tmpl
as a starting point which was originaly based on the WeeWX tags circa WeeWX 2.x. There has been a significant increase in the breadth of native WeeWX tags as well as improvements in the ability to create custom tags.
Tags that are currently not fully implemented in WEEWXtags.php
should be reviewed and implemented where possible. Following is a list of candidate tags:
this list will be updated as tags are implemented.
Very strange. The RPi is using America/Los_Angeles as local timezone. A date
command shows current time in the shell.
The WEEWXtags.php?sce=view shows the $time field as exactly 1 hour slow.
https://saratoga-weather.org/weewx/wxstatus.php
https://saratoga-weather.org/weewx/WEEWXtags.php?sce=view
Weewx 4.10.2, WeewxSaratoga 0.1.7
Recently, I started getting the following errors (and lack of current data) on the website. I'm running the latest weewx-saratoga (0.1.2)
Feb 1 12:35:34 TRP3WX weewx[10584] ERROR weewx.cheetahgenerator: Generate failed with exception '<class 'TypeError'>'
Feb 1 12:35:34 TRP3WX weewx[10584] ERROR weewx.cheetahgenerator: **** Ignoring template /etc/weewx/skins/WEEWXtags/WEEWXtags.php.tmpl
Feb 1 12:35:34 TRP3WX weewx[10584] ERROR weewx.cheetahgenerator: **** Reason: 'NoneType' object is not subscriptable
Feb 1 12:35:34 TRP3WX weewx[10584] ERROR weewx.cheetahgenerator: **** Traceback (most recent call last):
Feb 1 12:35:34 TRP3WX weewx[10584] ERROR weewx.cheetahgenerator: **** File "/usr/share/weewx/weewx/cheetahgenerator.py", line 326, in generate
Feb 1 12:35:34 TRP3WX weewx[10584] ERROR weewx.cheetahgenerator: **** unicode_string = compiled_template.respond()
Feb 1 12:35:34 TRP3WX weewx[10584] ERROR weewx.cheetahgenerator: **** File "_etc_weewx_skins_WEEWXtags_WEEWXtags_php_tmpl.py", line 512, in respond
Feb 1 12:35:34 TRP3WX weewx[10584] ERROR weewx.cheetahgenerator: **** File "/usr/share/weewx/weewx/tags.py", line 565, in __getattr__
Feb 1 12:35:34 TRP3WX weewx[10584] ERROR weewx.cheetahgenerator: **** vt = weewx.xtypes.get_scalar(obs_type, self.record, db_manager)
Feb 1 12:35:34 TRP3WX weewx[10584] ERROR weewx.cheetahgenerator: **** File "/usr/share/weewx/weewx/xtypes.py", line 73, in get_scalar
Feb 1 12:35:34 TRP3WX weewx[10584] ERROR weewx.cheetahgenerator: **** return xtype.get_scalar(obs_type, record, db_manager)
Feb 1 12:35:34 TRP3WX weewx[10584] ERROR weewx.cheetahgenerator: **** File "/usr/share/weewx/user/wsxtypes.py", line 87, in get_scalar
Feb 1 12:35:34 TRP3WX weewx[10584] ERROR weewx.cheetahgenerator: **** return getattr(self, 'calc_%s' % obs_type)(obs_type, record, db_manager)
Feb 1 12:35:34 TRP3WX weewx[10584] ERROR weewx.cheetahgenerator: **** File "/usr/share/weewx/user/wsxtypes.py", line 297, in calc_Easter
Feb 1 12:35:34 TRP3WX weewx[10584] ERROR weewx.cheetahgenerator: **** _year = datetime.date.fromtimestamp(record['dateTime']).year
Feb 1 12:35:34 TRP3WX weewx[10584] ERROR weewx.cheetahgenerator: **** TypeError: 'NoneType' object is not subscriptable
Feb 1 12:35:34 TRP3WX weewx[10584] INFO weewx.cheetahgenerator: Generated 0 files for report WEEWXtagsReport in 5.61 seconds
Feb 1 12:35:39 TRP3WX weewx[10584] ERROR weewx.drivers.vantage: ip-read error: timed out
Feb 1 12:35:39 TRP3WX weewx[10584] INFO weewx.imagegenerator: Generated 27 images for report WEEWXtagsReport in 4.92 seconds
Feb 1 12:35:39 TRP3WX weewx[10584] INFO user.stackedwindrose: Generated 1 images for WEEWXtagsReport in 0.11 seconds
Feb 1 12:35:43 TRP3WX weewx[10584] ERROR weewx.cheetahgenerator: Generate failed with exception '<class 'TypeError'>'
Feb 1 12:35:43 TRP3WX weewx[10584] ERROR weewx.cheetahgenerator: **** Ignoring template /etc/weewx/skins/Clientraw/clientrawextra.txt.tmpl
Feb 1 12:35:43 TRP3WX weewx[10584] ERROR weewx.cheetahgenerator: **** Reason: argument of type 'NoneType' is not iterable
Feb 1 12:35:43 TRP3WX weewx[10584] ERROR weewx.cheetahgenerator: **** Traceback (most recent call last):
Feb 1 12:35:43 TRP3WX weewx[10584] ERROR weewx.cheetahgenerator: **** File "/usr/share/weewx/weewx/cheetahgenerator.py", line 326, in generate
Feb 1 12:35:43 TRP3WX weewx[10584] ERROR weewx.cheetahgenerator: **** unicode_string = compiled_template.respond()
Feb 1 12:35:43 TRP3WX weewx[10584] ERROR weewx.cheetahgenerator: **** File "_etc_weewx_skins_Clientraw_clientrawextra_txt_tmpl.py", line 2353, in respond
Feb 1 12:35:43 TRP3WX weewx[10584] ERROR weewx.cheetahgenerator: **** File "/usr/share/weewx/weewx/tags.py", line 565, in __getattr__
Feb 1 12:35:43 TRP3WX weewx[10584] ERROR weewx.cheetahgenerator: **** vt = weewx.xtypes.get_scalar(obs_type, self.record, db_manager)
Feb 1 12:35:43 TRP3WX weewx[10584] ERROR weewx.cheetahgenerator: **** File "/usr/share/weewx/weewx/xtypes.py", line 73, in get_scalar
Feb 1 12:35:43 TRP3WX weewx[10584] ERROR weewx.cheetahgenerator: **** return xtype.get_scalar(obs_type, record, db_manager)
Feb 1 12:35:43 TRP3WX weewx[10584] ERROR weewx.cheetahgenerator: **** File "/usr/share/weewx/user/wsxtypes.py", line 87, in get_scalar
Feb 1 12:35:43 TRP3WX weewx[10584] ERROR weewx.cheetahgenerator: **** return getattr(self, 'calc_%s' % obs_type)(obs_type, record, db_manager)
Feb 1 12:35:43 TRP3WX weewx[10584] ERROR weewx.cheetahgenerator: **** File "/usr/share/weewx/user/wsxtypes.py", line 239, in calc_cbi
Feb 1 12:35:43 TRP3WX weewx[10584] ERROR weewx.cheetahgenerator: **** if any(key not in record for key in ['usUnits', 'outTemp', 'outHumidity']):
Feb 1 12:35:43 TRP3WX weewx[10584] ERROR weewx.cheetahgenerator: **** File "/usr/share/weewx/user/wsxtypes.py", line 239, in <genexpr>
Feb 1 12:35:43 TRP3WX weewx[10584] ERROR weewx.cheetahgenerator: **** if any(key not in record for key in ['usUnits', 'outTemp', 'outHumidity']):
Feb 1 12:35:43 TRP3WX weewx[10584] ERROR weewx.cheetahgenerator: **** TypeError: argument of type 'NoneType' is not iterable
Feb 1 12:35:45 TRP3WX weewx[10584] INFO weewx.cheetahgenerator: Generated 2 files for report ClientrawReport in 5.37 seconds
Feb 1 12:35:49 TRP3WX weewx[10584] INFO weewx.reportengine: ftpgenerator: Ftp'd 10 files in 4.39 seconds
Any hints on how to fix the errors??
The clientrawdaily.txt has 442 entries defined in Weather-Display. The weewx-saratoga one has 470 entries in it.
I've attached the current (from Weather-Display 10.37Sb125) description file.
Recently upgraded to latest weewx release 4.10.2 and the 0.1.7 release. (n.b. 0.1.7 shows as 0.1.6 in wee_extension --list)
Now getting these messages in /var/log/syslog
Sep 14 13:17:55 TRP3WX weewx[14345] ERROR weewx.cheetahgenerator: Evaluation of template /etc/weewx/skins/WEEWXtags/WEEWXtags.php.tmpl failed with exception '<class 'TypeError'>'
Sep 14 13:17:55 TRP3WX weewx[14345] ERROR weewx.cheetahgenerator: **** Ignoring template /etc/weewx/skins/WEEWXtags/WEEWXtags.php.tmpl
Sep 14 13:17:55 TRP3WX weewx[14345] ERROR weewx.cheetahgenerator: **** Reason: 'NoneType' object is not subscriptable
Sep 14 13:17:55 TRP3WX weewx[14345] ERROR weewx.cheetahgenerator: **** Traceback (most recent call last):
Sep 14 13:17:55 TRP3WX weewx[14345] ERROR weewx.cheetahgenerator: **** File "/usr/share/weewx/weewx/xtypes.py", line 77, in get_scalar
Sep 14 13:17:55 TRP3WX weewx[14345] ERROR weewx.cheetahgenerator: **** return xtype.get_scalar(obs_type, record, db_manager, **option_dict)
Sep 14 13:17:55 TRP3WX weewx[14345] ERROR weewx.cheetahgenerator: **** File "/usr/share/weewx/user/wsxtypes.py", line 101, in get_scalar
Sep 14 13:17:55 TRP3WX weewx[14345] ERROR weewx.cheetahgenerator: **** return getattr(self, 'calc_%s' % obs_type)(obs_type, record, db_manager)
Sep 14 13:17:55 TRP3WX weewx[14345] ERROR weewx.cheetahgenerator: **** File "/usr/share/weewx/user/wsxtypes.py", line 313, in calc_Easter
Sep 14 13:17:55 TRP3WX weewx[14345] ERROR weewx.cheetahgenerator: **** _year = datetime.date.fromtimestamp(record['dateTime']).year
Sep 14 13:17:55 TRP3WX weewx[14345] ERROR weewx.cheetahgenerator: **** TypeError: 'NoneType' object is not subscriptable
Sep 14 13:17:55 TRP3WX weewx[14345] ERROR weewx.cheetahgenerator: ****
Sep 14 13:17:55 TRP3WX weewx[14345] ERROR weewx.cheetahgenerator: **** During handling of the above exception, another exception occurred:
Sep 14 13:17:55 TRP3WX weewx[14345] ERROR weewx.cheetahgenerator: ****
Sep 14 13:17:55 TRP3WX weewx[14345] ERROR weewx.cheetahgenerator: **** Traceback (most recent call last):
Sep 14 13:17:55 TRP3WX weewx[14345] ERROR weewx.cheetahgenerator: **** File "/usr/share/weewx/weewx/cheetahgenerator.py", line 348, in generate
Sep 14 13:17:55 TRP3WX weewx[14345] ERROR weewx.cheetahgenerator: **** unicode_string = compiled_template.respond()
Sep 14 13:17:55 TRP3WX weewx[14345] ERROR weewx.cheetahgenerator: **** File "_etc_weewx_skins_WEEWXtags_WEEWXtags_php_tmpl.py", line 546, in respond
Sep 14 13:17:55 TRP3WX weewx[14345] ERROR weewx.cheetahgenerator: **** File "/usr/share/weewx/weewx/tags.py", line 599, in __getattr__
Sep 14 13:17:55 TRP3WX weewx[14345] ERROR weewx.cheetahgenerator: **** vt = weewx.xtypes.get_scalar(obs_type, self.record, db_manager)
Sep 14 13:17:55 TRP3WX weewx[14345] ERROR weewx.cheetahgenerator: **** File "/usr/share/weewx/weewx/xtypes.py", line 81, in get_scalar
Sep 14 13:17:55 TRP3WX weewx[14345] ERROR weewx.cheetahgenerator: **** return xtype.get_scalar(obs_type, record, db_manager)
Sep 14 13:17:55 TRP3WX weewx[14345] ERROR weewx.cheetahgenerator: **** File "/usr/share/weewx/user/wsxtypes.py", line 101, in get_scalar
Sep 14 13:17:55 TRP3WX weewx[14345] ERROR weewx.cheetahgenerator: **** return getattr(self, 'calc_%s' % obs_type)(obs_type, record, db_manager)
Sep 14 13:17:55 TRP3WX weewx[14345] ERROR weewx.cheetahgenerator: **** File "/usr/share/weewx/user/wsxtypes.py", line 313, in calc_Easter
Sep 14 13:17:55 TRP3WX weewx[14345] ERROR weewx.cheetahgenerator: **** _year = datetime.date.fromtimestamp(record['dateTime']).year
Sep 14 13:17:55 TRP3WX weewx[14345] ERROR weewx.cheetahgenerator: **** TypeError: 'NoneType' object is not subscriptable
Sep 14 13:17:55 TRP3WX weewx[14345] INFO weewx.cheetahgenerator: Generated 0 files for report WEEWXtagsReport in 5.93 seconds
hello, good day everyone. this file is incorrectly produced by weewx in two variables:
$ airdensity = '?' air_density '?'; // air density
And
$ wetbulb = '?' wet_bulb '?';
with two question marks between the quotes that give that error on the web page. Could you help me solve it?
thank you so much for your help
Since the AJAX scripts don't do much other than display the contents of time fields, I would be really helpful for them to be displayed uniformly for fields 32 (with seconds) and fields 134,135,166,174,175 with hours:minutes.
The preferred format for USA is '%-I:%M:%S_%p' for field 32 and '%-I:%M_%p' for the other ones.
For non-USA, it's %H:%M:%S' for field 32 and '%H:%M' for the other ones.
Could that be a setting in the [RealtimeClientraw] area or just automatically detected if the temperature unit is F (or != C)?
Likewise, the date format for field 74 should be '%-m/%-d/%Y' for USA and '%-d/%-m/%Y' otherwise.
Hi Giri80,
After the last update from commando sudo apt update && sudo apt upgrade (yesterday) these errors appared.
My configuratio is:
Raspbian GNU/Linux 11
Weewx 4.10.2
WEEWX-plugin 0.1.5
Mar 13 08:57:13 raspberrypi weewx[9488] ERROR weewx.cheetahgenerator: **** Ignoring template /etc/weewx/skins/WEEWXtags/WEEWXtags.php.tmpl
Mar 13 08:57:13 raspberrypi weewx[9488] ERROR weewx.cheetahgenerator: **** Reason: must be real number, not str
Mar 13 08:57:13 raspberrypi weewx[9488] ERROR weewx.cheetahgenerator: **** Traceback (most recent call last):
Mar 13 08:57:13 raspberrypi weewx[9488] ERROR weewx.cheetahgenerator: **** File "/usr/share/weewx/weewx/cheetahgenerator.py", line 348, in generate
Mar 13 08:57:13 raspberrypi weewx[9488] ERROR weewx.cheetahgenerator: **** unicode_string = compiled_template.respond()
Mar 13 08:57:13 raspberrypi weewx[9488] ERROR weewx.cheetahgenerator: **** File "_etc_weewx_skins_WEEWXtags_WEEWXtags_php_tmpl.py", line 2576, in respond
Mar 13 08:57:13 raspberrypi weewx[9488] ERROR weewx.cheetahgenerator: **** File "/usr/share/weewx/weewx/units.py", line 1063, in format
Mar 13 08:57:13 raspberrypi weewx[9488] ERROR weewx.cheetahgenerator: **** return self.toString(useThisFormat=format_string, None_string=None_string,
Mar 13 08:57:13 raspberrypi weewx[9488] ERROR weewx.cheetahgenerator: **** File "/usr/share/weewx/weewx/units.py", line 1047, in toString
Mar 13 08:57:13 raspberrypi weewx[9488] ERROR weewx.cheetahgenerator: **** s = self.formatter.toString(self.value_t, self.context, addLabel=addLabel,
Mar 13 08:57:13 raspberrypi weewx[9488] ERROR weewx.cheetahgenerator: **** File "/usr/share/weewx/weewx/units.py", line 707, in toString
Mar 13 08:57:13 raspberrypi weewx[9488] ERROR weewx.cheetahgenerator: **** s = self._to_string(val_t, context, addLabel, useThisFormat, None_string, localize)
Mar 13 08:57:13 raspberrypi weewx[9488] ERROR weewx.cheetahgenerator: **** File "/usr/share/weewx/weewx/units.py", line 773, in _to_string
Mar 13 08:57:13 raspberrypi weewx[9488] ERROR weewx.cheetahgenerator: **** val_str = format_string % val_t[0]
Mar 13 08:57:13 raspberrypi weewx[9488] ERROR weewx.cheetahgenerator: **** TypeError: must be real number, not str
Mar 13 08:57:13 raspberrypi weewx[9488] INFO weewx.cheetahgenerator: Generated 0 files for report WEEWXtagsReport in 4.66
Mar 13 09:06:50 raspberrypi weewx[9488] ERROR weewx.reportengine: Caught unrecoverable exception in generator 'weewx.imagegenerator.ImageGenerator'
Mar 13 09:06:50 raspberrypi weewx[9488] ERROR weewx.reportengine: **** could not convert string to float: 'NULL'
Mar 13 09:06:50 raspberrypi weewx[9488] ERROR weewx.reportengine: **** Traceback (most recent call last):
Mar 13 09:06:50 raspberrypi weewx[9488] ERROR weewx.reportengine: **** File "/usr/share/weewx/weewx/reportengine.py", line 197, in run
Mar 13 09:06:50 raspberrypi weewx[9488] ERROR weewx.reportengine: **** obj.start()
Mar 13 09:06:50 raspberrypi weewx[9488] ERROR weewx.reportengine: **** File "/usr/share/weewx/weewx/reportengine.py", line 385, in start
Mar 13 09:06:50 raspberrypi weewx[9488] ERROR weewx.reportengine: **** self.run()
Mar 13 09:06:50 raspberrypi weewx[9488] ERROR weewx.reportengine: **** File "/usr/share/weewx/weewx/imagegenerator.py", line 42, in run
Mar 13 09:06:50 raspberrypi weewx[9488] ERROR weewx.reportengine: **** self.gen_images(self.gen_ts)
Mar 13 09:06:50 raspberrypi weewx[9488] ERROR weewx.reportengine: **** File "/usr/share/weewx/weewx/imagegenerator.py", line 114, in gen_images
Mar 13 09:06:50 raspberrypi weewx[9488] ERROR weewx.reportengine: **** image = plot.render()
Mar 13 09:06:50 raspberrypi weewx[9488] ERROR weewx.reportengine: **** File "/usr/share/weewx/weeplot/genplot.py", line 216, in render
Mar 13 09:06:50 raspberrypi weewx[9488] ERROR weewx.reportengine: **** self._calcYScaling()
Mar 13 09:06:50 raspberrypi weewx[9488] ERROR weewx.reportengine: **** File "/usr/share/weewx/weeplot/genplot.py", line 542, in _calcYScaling
Mar 13 09:06:50 raspberrypi weewx[9488] ERROR weewx.reportengine: **** self.yscale = weeplot.utilities.scale(ymin, ymax, self.yscale, nsteps=self.y_nticks)
Mar 13 09:06:50 raspberrypi weewx[9488] ERROR weewx.reportengine: **** File "/usr/share/weewx/weeplot/utilities.py", line 87, in scale
Mar 13 09:06:50 raspberrypi weewx[9488] ERROR weewx.reportengine: **** data_min = float(data_min)
Mar 13 09:06:50 raspberrypi weewx[9488] ERROR weewx.reportengine: **** ValueError: could not convert string to float: 'NULL'
Mar 13 09:06:50 raspberrypi weewx[9488] ERROR weewx.reportengine: **** Generator terminated
And
Mar 13 09:06:56 raspberrypi weewx[9488] ERROR weewx.cheetahgenerator: **** Ignoring template /etc/weewx/skins/Clientraw/clientrawextra.txt.tmpl
Mar 13 09:06:56 raspberrypi weewx[9488] ERROR weewx.cheetahgenerator: **** Reason: must be real number, not str
Mar 13 09:06:56 raspberrypi weewx[9488] ERROR weewx.cheetahgenerator: **** Traceback (most recent call last):
Mar 13 09:06:56 raspberrypi weewx[9488] ERROR weewx.cheetahgenerator: **** File "/usr/share/weewx/weewx/cheetahgenerator.py", line 348, in generate
Mar 13 09:06:56 raspberrypi weewx[9488] ERROR weewx.cheetahgenerator: **** unicode_string = compiled_template.respond()
Mar 13 09:06:56 raspberrypi weewx[9488] ERROR weewx.cheetahgenerator: **** File "_etc_weewx_skins_Clientraw_clientrawextra_txt_tmpl.py", line 2094, in respond
Mar 13 09:06:57 raspberrypi weewx[9488] ERROR weewx.cheetahgenerator: **** File "/usr/share/weewx/weewx/units.py", line 1063, in format
Mar 13 09:06:57 raspberrypi weewx[9488] ERROR weewx.cheetahgenerator: **** return self.toString(useThisFormat=format_string, None_string=None_string,
Mar 13 09:06:57 raspberrypi weewx[9488] ERROR weewx.cheetahgenerator: **** File "/usr/share/weewx/weewx/units.py", line 1047, in toString
Mar 13 09:06:57 raspberrypi weewx[9488] ERROR weewx.cheetahgenerator: **** s = self.formatter.toString(self.value_t, self.context, addLabel=addLabel,
Mar 13 09:06:57 raspberrypi weewx[9488] ERROR weewx.cheetahgenerator: **** File "/usr/share/weewx/weewx/units.py", line 707, in toString
Mar 13 09:06:57 raspberrypi weewx[9488] ERROR weewx.cheetahgenerator: **** s = self._to_string(val_t, context, addLabel, useThisFormat, None_string, localize)
Mar 13 09:06:57 raspberrypi weewx[9488] ERROR weewx.cheetahgenerator: **** File "/usr/share/weewx/weewx/units.py", line 773, in _to_string
Mar 13 09:06:57 raspberrypi weewx[9488] ERROR weewx.cheetahgenerator: **** val_str = format_string % val_t[0]
Mar 13 09:06:57 raspberrypi weewx[9488] ERROR weewx.cheetahgenerator: **** TypeError: must be real number, not str
Mar 13 09:06:57 raspberrypi weewx[9488] DEBUG weewx.cheetahgenerator: Skip 'clientrawhour.txt': last_mod=1678694627.9253519 age=189.14470076560974 stale=540
Mar 13 09:06:57 raspberrypi weewx[9488] DEBUG weewx.cheetahgenerator: Skip 'clientrawdaily.txt': last_mod=1678694631.3552747 age=185.73088264465332 stale=540
Thank for help
Updated to Weewx 4.10.2 and weewx-saratoga 0.1.7 and started weewx.
For the first hour after startup, the following tags in WEEWXtags.php had non-numeric values:
$tempchangehour = '--'; // Temperature change in the last hour
$humchangelasthour = '--'; // Humidity change last hour
$dewchangelasthour = '--'; // Dew point change last hour
$barochangelasthour = '--'; // Baro change last hour
$trend = '--'; // amount of change in the last hour
$trend3hour = '--'; // amount of change in the last 3 hours
I realize those are the 'missing' value string. Unfortunately, in ajax-dashboard.php, ajax-gizmo.php they cause fatal errors (Non numeric) with PHP 8.2.1.
Given that the multi-hour (3hr, 24hr) values were obtained from the db and displayed correctly, couldn't the values from 1hr ago in the db be returned instead?
The net effect of the current method means a broken site for 1 hour after weewx startup can happen.
trying the current .zip with eb531c8 last commit results in:
pi@TRP3WX:~ $ sudo /etc/init.d/weewx stop
[ ok ] Stopping weewx (via systemctl): weewx.service.
pi@TRP3WX:~ $ sudo wee_extension --install=weewx-saratoga-0.1.0b.zip
Request to install 'weewx-saratoga-0.1.0b.zip'
Extracting from zip archive weewx-saratoga-0.1.0b.zip
Traceback (most recent call last):
File "/usr/share/weewx/wee_extension", line 88, in <module>
main()
File "/usr/share/weewx/wee_extension", line 80, in main
ext.install_extension(options.install)
File "/usr/share/weewx/weecfg/extension.py", line 125, in install_extension
self.install_from_dir(extension_dir)
File "/usr/share/weewx/weecfg/extension.py", line 147, in install_from_dir
extension_dir)
File "/usr/share/weewx/weecfg/__init__.py", line 1866, in get_extension_installer
__import__('install')
File "/var/tmp/weewx-saratoga-main/install.py", line 143, in <module>
TypeError: initial_value must be unicode or None, not str
pi@TRP3WX:~ $
Today I accidental had rtcr
generate a malformed clientraw.txt
. Of course clientraw.txt
was not being updated on my web server and I proceeded to fault find. I could see clientraw.txt
appearing on my WeeWX machine but did not notice the malformation. there were no errors in the WeeWX log. I looked at my web server and confirmed no clientraw.txt
was being saved anywhere. I checked the web server error log and no errors. I checked the web server access log and could clearly see post-clientaw.php
sending/logging a 200 response. I eventually discovered the malformed clientraw.txt
. The problem with clientraw.txt
was that it did not pass the end of file record check so the content was discarded. It would have been useful if something was logged when the content was discarded.
In an earlier rtcr
I had the web server send back a simple character string 'OK' to indicate to rtcr
that the file was received OK. This stopped working under python3 and I have not been able to get python 3 to recognise the response. This would have helped by placing an entry in the WeeWX log.
Perhaps the post-clientraw.php
script should log receipt of a malformed clientraw.txt
.
Issue #20 indicates the lack of pyepehem
will cause an xtype error which causes WEEWXtags.php
to fail to generate.
The weewx-saratga
templets should tolerate the absence of pyephem
I live inside the arctic circle. At this time of year the sun is below the horizon 24/7 and at the same time WEEWXtags.php stops updating
Alf
Did a fresh install today and noticed that the WEEWXtags/Clientraw skins were not being generated.
install.py has
[StdReport]
[[WEEWXtagsReport]]
skin = WEEWXtags
enable = True
[[[Units]]]
[[[[TimeFormats]]]]
date_f = %d/%m/%Y
date_time_f = %d/%m/%Y %H:%M
[[ClientrawReport]]
skin = Clientraw
enable = True
I had to change weewx.conf to:
[StdReport]
[[WEEWXtagsReport]]
skin = WEEWXtags
enable = true
[[[Units]]]
[[[[TimeFormats]]]]
date_f = %d/%m/%Y
date_time_f = %d/%m/%Y %H:%M
[[ClientrawReport]]
skin = Clientraw
enable = true
to enable them. I guess that True != true
in python3.
Looking at the values for season and lunar cycle dates compared to Weather-Display shows the format from pyephem uses a date/time format that is 'H:M UTC dd MON YYYY' when 'H:M UTC MON dd YYYY' is the WD expected format.
It's not causing a problem with the template so far, it's just not matching the expected WD date format for the fields:
Variable Weather-Display WEEWXtags
$marchequinox 09:38 UTC March 20 2021 15:33 UTC 20 March 2022
$junesolstice 03:33 UTC June 21 2021 03:32 UTC 21 June 2021
$sepequinox 19:22 UTC September 22 2021 19:21 UTC 22 September 2021
$decsolstice 16:00 UTC December 21 2021 15:59 UTC 21 December 2021
$moonperihel 17:15 UTC January 3 2022 01:15 UTC 4 January 2022
$moonaphel 02:08 UTC July 5 2021 02:31 UTC 6 July 2021
$moonperigee 15:21 UTC April 27 2021 15:25 UTC 27 April 2021
$moonapogee 21:54 UTC May 11 2021 21:54 UTC 11 May 2021
$newmoon 02:31 UTC April 12 2021 02:30 UTC 12 April 2021
$nextnewmoon 19:01 UTC May 11 2021 18:59 UTC 11 May 2021
$firstquarter 07:00 UTC April 20 2021 19:12 UTC 19 May 2021
$lastquarter 19:51 UTC May 3 2021 19:50 UTC 3 May 2021
$fullmoon 03:32 UTC April 27 2021 03:31 UTC 27 April 2021
$fullmoondate April 27 2021 27 Apr 2021
The $firstquarter for WeeWX shows the next first quarter, while the WD value is for the current month first quarter, but that's not a problem. The times are within one minute, so that's quite good.
For the Moon status:
Variable Weather-Display WEEWXtags
$moonage Moon age: 9 days,0 hours,28 minutes,67% Moon age: 10 days,20 hours,24 minutes,67%
$moonphase 67% 67%
$moonphasename Waxing Gibbous Moon Waxing gibbous
The 'age' seems a bit off, but the percent full and phase names do match.
RealtimeClientraw currently allows the user to transfer clientraw.txt
to a single end point via HTTP POST. It would be useful if the user could specify more than one endpoint for the HTTP POST transfers.
Using my compare-clientrawextra.php utility, I see that the weewx-saratoga clientrawextra.txt is missing values from [767] to [819] which is the new end-of-record.
Any chance of getting the missing values inserted in the record?
Can we get the realtime clientraw.txt mod installed with the weewx-saratoga plugin and replace the ClientrawReport version now creating clientraw.txt?
Also, does the rtcr work with non-Davis stations? If not, then I think the install.py would check for Davis station before installing/replacing the existing CheetaReports generated clientraw.txt template. That way, Davis stations would get near-realtime while other stations would get archive-interval clientraw.txt.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.