index.html not updating

97 views
Skip to first unread message

Neil S

unread,
Dec 15, 2019, 12:54:31 PM12/15/19
to weewx-user
Weewx working fine for months after upgrade to latest version and Seasons skin then all of a sudden on Thur (12/12) at 7am the index.html file stopped updating. However the pngs are being updated and are current (so in reality when uploaded to the website are showing correct date - it's just the time and date that are incorrect.)

Raspberry Pi - Running Jessie
Weewx v3.9.2
Skin Seasons

Now I see the index.temp.html appear briefly on the pi but then disappear. Here are the relevant part of the logs I believe. Note that this error didn't occur at the 06:55 page generation.

Dec 12 06:55:50 localhost weewx[217]: ftpgenerator: ftp'd 22 files in 1.39 seconds
Dec 12 07:00:23 localhost weewx[217]: manager: Added record 2019-12-12 07:00:00 GMT (1576134000) to database 'weewx.sdb'
Dec 12 07:00:23 localhost rsyslogd-2007: action 'action 17' suspended, next retry is Thu Dec 12 07:01:53 2019 [try http://www.rsyslog.com/e/2007 ]
Dec 12 07:00:23 localhost weewx[217]: manager: Added record 2019-12-12 07:00:00 GMT (1576134000) to daily summary in 'weewx.sdb'
Dec 12 07:00:24 localhost weewx[217]: restx: Wunderground-PWS: Published record 2019-12-12 07:00:00 GMT (1576134000)
Dec 12 07:00:38 localhost weewx[217]: ****  Traceback (most recent call last):
Dec 12 07:00:38 localhost weewx[217]: ****    File "/usr/share/weewx/weewx/cheetahgenerator.py", line 332, in generate
Dec 12 07:00:38 localhost weewx[217]: ****      fd.write(str(compiled_template))
Dec 12 07:00:38 localhost weewx[217]: ****    File "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1005, in __str__
Dec 12 07:00:38 localhost weewx[217]: ****      rc = getattr(self, mainMethName)()
Dec 12 07:00:38 localhost weewx[217]: ****    File "_etc_weewx_skins_Seasons_index_html_tmpl.py", line 217, in respond
Dec 12 07:00:38 localhost weewx[217]: ****    File "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1615, in _handleCheetahInclude
Dec 12 07:00:38 localhost weewx[217]: ****      self._CHEETAH__cheetahIncludes[_includeID].respond(trans)
Dec 12 07:00:38 localhost weewx[217]: ****    File "_etc_weewx_skins_Seasons_sensors_inc.py", line 411, in respond
Dec 12 07:00:39 localhost weewx[217]: ****    File "_etc_weewx_skins_Seasons_sensors_inc.py", line 193, in __errorCatcher14
Dec 12 07:00:39 localhost weewx[217]: ****    File "<string>", line 1, in <module>
Dec 12 07:00:39 localhost weewx[217]: ****    File "/usr/share/weewx/weewx/units.py", line 967, in raw
Dec 12 07:00:39 localhost weewx[217]: ****      return self._raw_value_tuple[0]
Dec 12 07:00:39 localhost weewx[217]: ****    File "/usr/share/weewx/weewx/units.py", line 991, in _raw_value_tuple
Dec 12 07:00:39 localhost weewx[217]: ****      vtx = self.converter.convert(self.value_t)
Dec 12 07:00:39 localhost weewx[217]: ****    File "/usr/share/weewx/weewx/units.py", line 778, in convert
Dec 12 07:00:39 localhost weewx[217]: ****      if val_t[1] is None and val_t[2] is None:
Dec 12 07:00:39 localhost weewx[217]: ****  TypeError: 'UnknownType' object does not support indexing
Dec 12 07:00:39 localhost weewx[217]: ****  Traceback (most recent call last):
Dec 12 07:00:39 localhost weewx[217]: ****    File "/usr/share/weewx/weewx/cheetahgenerator.py", line 332, in generate
Dec 12 07:00:39 localhost weewx[217]: ****      fd.write(str(compiled_template))
Dec 12 07:00:39 localhost weewx[217]: ****    File "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1005, in __str__
Dec 12 07:00:39 localhost weewx[217]: ****      rc = getattr(self, mainMethName)()
Dec 12 07:00:39 localhost weewx[217]: ****    File "_etc_weewx_skins_Seasons_telemetry_html_tmpl.py", line 194, in respond
Dec 12 07:00:39 localhost weewx[217]: ****    File "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1615, in _handleCheetahInclude
Dec 12 07:00:39 localhost weewx[217]: ****      self._CHEETAH__cheetahIncludes[_includeID].respond(trans)
Dec 12 07:00:39 localhost weewx[217]: ****    File "_etc_weewx_skins_Seasons_sensors_inc.py", line 411, in respond
Dec 12 07:00:39 localhost weewx[217]: ****    File "_etc_weewx_skins_Seasons_sensors_inc.py", line 193, in __errorCatcher14
Dec 12 07:00:39 localhost weewx[217]: ****    File "<string>", line 1, in <module>
Dec 12 07:00:39 localhost weewx[217]: ****    File "/usr/share/weewx/weewx/units.py", line 967, in raw
Dec 12 07:00:39 localhost weewx[217]: ****      return self._raw_value_tuple[0]
Dec 12 07:00:39 localhost weewx[217]: ****    File "/usr/share/weewx/weewx/units.py", line 991, in _raw_value_tuple
Dec 12 07:00:39 localhost weewx[217]: ****      vtx = self.converter.convert(self.value_t)
Dec 12 07:00:39 localhost weewx[217]: ****    File "/usr/share/weewx/weewx/units.py", line 778, in convert
Dec 12 07:00:39 localhost weewx[217]: ****      if val_t[1] is None and val_t[2] is None:
Dec 12 07:00:39 localhost weewx[217]: ****  TypeError: 'UnknownType' object does not support indexing
Dec 12 07:00:42 localhost weewx[217]: cheetahgenerator: Generated 6 files for report SeasonsReport in 18.03 seconds


Any one any ideas what is causing this or how to debug any further?
(Please note that from my googling the line Dec 12 07:00:23 localhost rsyslogd-2007: action 'action 17' suspended, next retry is Thu Dec 12 07:01:53 2019 [try http://www.rsyslog.com/e/2007  I think is related to log rotation and was happening before this incident started)

TIA
Neil


 

vince

unread,
Dec 15, 2019, 1:00:33 PM12/15/19
to weewx-user
The rsyslogd thing is not related to anything weewx, it's just a longstanding os annoyance that has been around for years.

Cheetah explosions are painful to figure out for sure.   Best guess is you have some unexpected or missing data that it can't figure out how to do unit conversions on. 

Thomas Keffer

unread,
Dec 15, 2019, 2:36:36 PM12/15/19
to weewx-user
In addition to Vince's comments, I would add that the problem is most likely in the file /etc/weewx/skins/Seasons/sensors.inc. Did you change anything in there?

-tk

On Sun, Dec 15, 2019 at 11:00 AM vince <vince...@gmail.com> wrote:
The rsyslogd thing is not related to anything weewx, it's just a longstanding os annoyance that has been around for years.

Cheetah explosions are painful to figure out for sure.   Best guess is you have some unexpected or missing data that it can't figure out how to do unit conversions on. 

--
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+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/325d6a1b-55b4-4f3c-b912-d7d8151aeb67%40googlegroups.com.

Neil S

unread,
Dec 16, 2019, 12:48:18 PM12/16/19
to weewx-user
Thanks Thomas.

Yes I did alter it (to add a UV sensor) on 14th July.

So not sure why it finally gave up the ghost on 12th Dec! 

I have re-instated your original sensors.inc and it has started working again (albeit without the UV sensor). . 

Well at least it gives me something to do over Xmas to work out why it went wrong! 

Thanks for the help. 

If you are interested the sensors.inc that broke it is as follows:-

## sensors module for weewx skins
## Copyright Tom Keffer, Matthew Wall
## See LICENSE.txt for your rights
#errorCatcher Echo

## this is a conditional display of sensor data, including connectivity,
## battery status, and various voltages.  if there are no data available,
## then this degenerates to nothing displayed.

#def get_battery_status($x)
#if $x == 0
<span class="status_ok">OK</span>
#else
<span class="status_low">LOW</span>
#end if
#end def

## first see what sensor data are available

#set $have_conn = 0
#for $x in [$day.rxCheckPercent]
  #if $x.has_data
    #set $have_conn = 1
  #end if
#end for

#set $have_battery_status = 0
#for $x in [$day.txBatteryStatus, $day.windBatteryStatus, $day.rainBatteryStatus, $day.outTempBatteryStatus, $day.inTempBatteryStatus, $day.uvBatteryStatus]
  #if $x.has_data
    #set $have_battery_status = 1
  #end if
#end for
 
#set $have_voltage = 0
#for $x in [$day.consBatteryVoltage, $day.heatingVoltage, $day.supplyVoltage, $day.referenceVoltage]
  #if $x.has_data
    #set $have_voltage = 1
  #end if

#end for


## now display the available data only

#if $have_conn or $have_battery_status or $have_voltage
<div id='sensors_widget' class="widget">
  <div class="widget_title">
    <a href="telemetry.html">Sensor Status</a>
    <a class="widget_control"
      onclick="toggle_widget('sensors')">&diams;</a>
  </div>
  <div class="widget_contents">
  <table>

#if $have_conn
    <tr><th>Connectivity</th><th></th></tr>
#if $day.rxCheckPercent.has_data
    <tr>
      <td class="label">$obs.label.rxCheckPercent</td>
      <td class="data">$current.rxCheckPercent</td>
    </tr>
#end if
#end if

#if $have_battery_status
    <tr><th>Battery Status</th><th></th></tr>
#if $day.txBatteryStatus.has_data
    <tr>
      <td class="label">$obs.label.txBatteryStatus</td>
      <td class="data">$get_battery_status($current.txBatteryStatus.raw)</td>
    </tr>
#end if
#if $day.windBatteryStatus.has_data
    <tr>
      <td class="label">$obs.label.windBatteryStatus</td>
      <td class="data">$get_battery_status($current.windBatteryStatus.raw)</td>
    </tr>
#end if
#if $day.rainBatteryStatus.has_data
    <tr>
      <td class="label">$obs.label.rainBatteryStatus</td>
      <td class="data">$get_battery_status($current.rainBatteryStatus.raw)</td>
    </tr>
#end if
#if $day.outTempBatteryStatus.has_data
    <tr>
      <td class="label">$obs.label.outTempBatteryStatus</td>
      <td class="data">$get_battery_status($current.outTempBatteryStatus.raw)</td>
    </tr>
#end if
#if $day.inTempBatteryStatus.has_data
    <tr>
      <td class="label">$obs.label.inTempBatteryStatus</td>
      <td class="data">$get_battery_status($current.inTempBatteryStatus.raw)</td>
    </tr>
#end if

    <tr>
      <td class="label">$obs.label.uvBatteryStatus</td>
      <td class="data">$get_battery_status($current.uvBatteryStatus.raw)</td>
    </tr>

#end if

#if $have_voltage
    <tr><th>Voltage</th><th></th></tr>
#if $day.consBatteryVoltage.has_data
    <tr>
      <td class="label">$obs.label.consBatteryVoltage</td>
      <td class="data">$current.consBatteryVoltage</td>
    </tr>
#end if
#if $day.heatingVoltage.has_data
    <tr>
      <td class="label">$obs.label.heatingVoltage</td>
      <td class="data">$current.heatingVoltage</td>
    </tr>
#end if
#if $day.supplyVoltage.has_data
    <tr>
      <td class="label">$obs.label.supplyVoltage</td>
      <td class="data">$current.supplyVoltage</td>
    </tr>
#end if
#if $day.referenceVoltage.has_data
    <tr>
      <td class="label">$obs.label.referenceVoltage</td>
      <td class="data">$current.referenceVoltage</td>
    </tr>
#end if
#end if
  </table>
  </div>

</div>
#end if



On Sunday, 15 December 2019 19:36:36 UTC, Thomas Keffer wrote:
In addition to Vince's comments, I would add that the problem is most likely in the file /etc/weewx/skins/Seasons/sensors.inc. Did you change anything in there?

-tk

On Sun, Dec 15, 2019 at 11:00 AM vince <vince...@gmail.com> wrote:
The rsyslogd thing is not related to anything weewx, it's just a longstanding os annoyance that has been around for years.

Cheetah explosions are painful to figure out for sure.   Best guess is you have some unexpected or missing data that it can't figure out how to do unit conversions on. 

--
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...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages