Hi Phil,

Now I am confused. I can see the mechanism that is causing the failure. The 
following code in the template:

#set $hourlyrainTH = 0
#set $ThourlyrainTH = ''
#for $hour in $day.hours
#if $hour.rain.sum.raw > $hourlyrainTH
#set $hourlyrainTH = $hour.rain.sum.raw
#set $ThourlyrainTH = $hour.dateTime.format("%H:%M")
#end if
#end for

determines the maximum hourly rainfall for the day and the hour in which it 
occurred by iterating over each hour in the current day. But for some 
reason $hour.rain.sum.raw returns python value None for at least one of the 
hours. Hence the error message:

Apr  5 13:00:19 raspberrypi weewx[604] ERROR weewx.cheetahgenerator: **** 
Ignoring template /home/weewx/skins/ss/gauge-data.txt.tmpl
Apr  5 13:00:19 raspberrypi weewx[604] ERROR weewx.cheetahgenerator: **** 
Reason: '>' not supported between instances of 'NoneType' and 'int'

There are only two > comparisons in the gauge-data.txt.tmpl; the other one 
is not rain related and is not causing the error. This is confirmed by you 
commenting out all the rain related lines in the template. As far as I can 
tell the only way that $hour.rain.sum.raw would return None is if there was 
no rain data in the archive for that hour or if some other error was 
involved. Normally field rain is zero if there is no rain recorded so 
$hour.rain.sum.raw would return 0 if there was no rain. Hence my questions 
about missing data, but once you have a solid compete day of data you 
should be fine.

In any case, I have modified the gauge-data.txt.tmpl so that it will skip 
the comparision if $hour.rain.sum.raw is None. I suspect there is some 
other underlying issue but at least now the template will generate without 
error. I will give this some more thought as how to track down what else 
might be going on. To install the revised gauge-data.txt.tmpl:

1. rename your existing skins/ss/gauge-data.txt.tmpl to 
gauge-data_orig.txt.tmpl or some other name in case you need to revert
2. download the attached gauge-data.txt.tmpl in place of your current 
version
3. wait for the next report cycle and confirm in the log that gauge-data.txt 
was generated without error.

Just out of interest have you had any rain since installing 4.0? If so has 
it been recorded/displayed correctly by WeeWX on the SteelSeries gauges or 
other pages?

Oh, and regards the imagegenrator error:

Apr  5 13:00:19 raspberrypi weewx[604] ERROR weewx.reportengine: Caught 
unrecoverable exception in generator 'weewx.imagegenerator.ImageGenerator'
Apr  5 13:00:19 raspberrypi weewx[604] ERROR weewx.reportengine:         
****  rainrate
Apr  5 13:00:19 raspberrypi weewx[604] ERROR weewx.reportengine:         
****  Traceback (most recent call last):
Apr  5 13:00:19 raspberrypi weewx[604] ERROR weewx.reportengine:         
****    File "/home/weewx/bin/weewx/reportengine.py", line 197, in run
Apr  5 13:00:19 raspberrypi weewx[604] ERROR weewx.reportengine:         
****      obj.start()
Apr  5 13:00:19 raspberrypi weewx[604] ERROR weewx.reportengine:         
****    File "/home/weewx/bin/weewx/reportengine.py", line 280, in start
Apr  5 13:00:19 raspberrypi weewx[604] ERROR weewx.reportengine:         
****      self.run()
Apr  5 13:00:19 raspberrypi weewx[604] ERROR weewx.reportengine:         
****    File "/home/weewx/bin/weewx/imagegenerator.py", line 41, in run
Apr  5 13:00:19 raspberrypi weewx[604] ERROR weewx.reportengine:         
****      self.genImages(self.gen_ts)
Apr  5 13:00:19 raspberrypi weewx[604] ERROR weewx.reportengine:         
****    File "/home/weewx/bin/weewx/imagegenerator.py", line 180, in 
genImages
Apr  5 13:00:19 raspberrypi weewx[604] ERROR weewx.reportengine:         
****      aggregate_interval=aggregate_interval)
Apr  5 13:00:19 raspberrypi weewx[604] ERROR weewx.reportengine:         
****    File "/home/weewx/bin/weewx/xtypes.py", line 91, in get_series
Apr  5 13:00:19 raspberrypi weewx[604] ERROR weewx.reportengine:         
****      raise weewx.UnknownType(obs_type)
Apr  5 13:00:19 raspberrypi weewx[604] ERROR weewx.reportengine:         
****  weewx.UnknownType: rainrate
Apr  5 13:00:19 raspberrypi weewx[604] ERROR weewx.reportengine:         
****  Generator terminated

that will be due to the use of rainrate somewhere in the [ImageGenerator] 
stanza in skin.conf, the actual field name that WeeWX uses for rain rate is 
rainRate - case matters in this case.

Gary

On Monday, 6 April 2020 20:09:45 UTC+10, Phil Owers wrote:
>
> Hi Gary
> Returned gauge template to normal and restored rainrate in ss/skin.conf.
> Its still failing at the moment
> Phil
>
> On Saturday, April 4, 2020 at 10:40:41 AM UTC+1, Phil Owers wrote:
>>
>> Hi Guys
>>
>> First of all I hope everybody is staying safe and well
>>
>> Before I go into to many details  should weewx v4.0.0b18 work on its own.
>>
>> Followed the Installation using setup.py, loaded all the prerequisites 
>> for Debian 10(Buster)
>> Installed using python3 ./setup.py build  , sudo python3 ./setup.py 
>> install
>>
>> Entered the name, vantage (6), serial , metric, ttyusb0  etc.
>>
>> Then started weewx using sudo ./bin/weewx
>> It downloaded all the data from my test console (This works fine plug 
>> into another rasp pi v 3.9.2) then failed continuously overnight with no 
>> graphs being generated.
>> The weewx.sdb was generated.
>>
>> Apr  4 10:22:20 raspberrypi weewx[1030] INFO weewx.manager: Starting 
>> backfill of daily summaries
>> Apr  4 10:22:22 raspberrypi weewx[1030] INFO weewx.engine: Starting main 
>> packet loop.
>> Apr  4 10:22:26 raspberrypi weewx[1030] INFO weewx.engine: Main loop 
>> exiting. Shutting engine down.
>> Apr  4 10:22:26 raspberrypi weewx[1030] CRITICAL __main__: Caught 
>> OSError: [Errno 5] Input/output error
>> Apr  4 10:22:26 raspberrypi weewx[1030] CRITICAL __main__:     ****  
>> Traceback (most recent call last):
>> Apr  4 10:22:26 raspberrypi weewx[1030] CRITICAL __main__:     ****    
>> File "./bin/weewxd", line 154, in main
>> Apr  4 10:22:26 raspberrypi weewx[1030] CRITICAL __main__:     ****      
>> engine.run()
>> Apr  4 10:22:26 raspberrypi weewx[1030] CRITICAL __main__:     ****    
>> File "/home/weewx/bin/weewx/engine.py", line 191, in run
>> Apr  4 10:22:26 raspberrypi weewx[1030] CRITICAL __main__:     ****      
>> self.dispatchEvent(weewx.Event(weewx.NEW_LOOP_PACKET, packet=packet))
>> Apr  4 10:22:26 raspberrypi weewx[1030] CRITICAL __main__:     ****    
>> File "/home/weewx/bin/weewx/engine.py", line 224, in dispatchEvent
>> Apr  4 10:22:26 raspberrypi weewx[1030] CRITICAL __main__:     ****      
>> callback(event)
>> Apr  4 10:22:26 raspberrypi weewx[1030] CRITICAL __main__:     ****    
>> File "/home/weewx/bin/weewx/engine.py", line 740, in new_loop_packet
>> Apr  4 10:22:26 raspberrypi weewx[1030] CRITICAL __main__:     ****      
>> to_sorted_string(event.packet))
>> Apr  4 10:22:26 raspberrypi weewx[1030] CRITICAL __main__:     ****  
>> OSError: [Errno 5] Input/output error
>> Apr  4 10:22:26 raspberrypi weewx[1030] CRITICAL __main__:     ****  
>> Waiting 10 seconds then retrying...
>> Apr  4 10:22:28 raspberrypi kernel: [38075.324656] usb 1-1.3: new 
>> high-speed USB device number 6 using xhci_hcd
>>
>> No extensions have been added . Apologies if Ive jumped the gun and this 
>> doesn't work yet as a standalone
>> Phil
>>
>

-- 
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/89b69eec-497d-4376-b64c-b45798a8e35d%40googlegroups.com.

Attachment: gauge-data.txt.tmpl
Description: Binary data

Reply via email to