OK, essentially the same file but double spaced. The problem looks like it 
is due to field radiation being either missing or None. Try changing the 
following line:

syslog.syslog(syslog.LOG_DEBUG, "Calculated sunshine_hours = %f, based on 
radiation = %f, and min_sunshine = %f" %

to

syslog.syslog(syslog.LOG_DEBUG, "Calculated sunshine_hours = %f, based on 
radiation = %s, and min_sunshine = %f" %

You will need to restart WeeWX for the change to take effect.

Gary

On Wednesday, 16 October 2019 16:50:00 UTC+10, Stefan wrote:
>
> Hello Gray.
>
> Here is the Script. Thx for Help.
>
> Am Mittwoch, 16. Oktober 2019 07:47:43 UTC+2 schrieb gjr80:
>>
>> Chances are field radiation does not exist in an archive record or it is 
>> set to None. I am afraid if you want any further help you are going to have 
>> to post the copy of radiationhours.py that you are using; the version in 
>> the repo you linked only has 106 lines of code and the error trace you 
>> posted indicates the error is at line 203.
>>
>> Gary
>>
>> On Wednesday, 16 October 2019 15:26:42 UTC+10, Stefan wrote:
>>>
>>> Hello.
>>>
>>> The problem has reappeared today. Weewx stops the work. I have not 
>>> changed the script, not adjusted to the threshold. This is still on 
>>> 120W min. It ran until this morning without problems. But again this 
>>> error message.
>>>
>>> Oct 16 07:22:48 raspberrypi weewx[14709]: engine: Caught unrecoverable 
>>> exception in engine:
>>> Oct 16 07:22:48 raspberrypi weewx[14709]:     ****  float argument 
>>> required, not NoneType
>>> Oct 16 07:22:48 raspberrypi weewx[14709]:     ****  Traceback (most 
>>> recent call last):
>>> Oct 16 07:22:48 raspberrypi weewx[14709]:     ****    File 
>>> "/usr/share/weewx/weewx/engine.py", line 890, in main
>>> Oct 16 07:22:48 raspberrypi weewx[14709]:     ****      engine.run()
>>> Oct 16 07:22:48 raspberrypi weewx[14709]:     ****    File 
>>> "/usr/share/weewx/weewx/engine.py", line 160, in run
>>> Oct 16 07:22:48 raspberrypi weewx[14709]:     ****      
>>> self.dispatchEvent(weewx.Event(weewx.STARTUP))
>>> Oct 16 07:22:48 raspberrypi weewx[14709]:     ****    File 
>>> "/usr/share/weewx/weewx/engine.py", line 224, in dispatchEvent
>>> Oct 16 07:22:48 raspberrypi weewx[14709]:     ****      callback(event)
>>> Oct 16 07:22:48 raspberrypi weewx[14709]:     ****    File 
>>> "/usr/share/weewx/weewx/engine.py", line 520, in startup
>>> Oct 16 07:22:48 raspberrypi weewx[14709]:     ****      
>>> self._catchup(self.engine.console.genStartupRecords)
>>> Oct 16 07:22:48 raspberrypi weewx[14709]:     ****    File 
>>> "/usr/share/weewx/weewx/engine.py", line 635, in _catchup
>>> Oct 16 07:22:48 raspberrypi weewx[14709]:     ****      
>>> origin='hardware'))
>>> Oct 16 07:22:48 raspberrypi weewx[14709]:     ****    File 
>>> "/usr/share/weewx/weewx/engine.py", line 224, in dispatchEvent
>>> Oct 16 07:22:48 raspberrypi weewx[14709]:     ****      callback(event)
>>> Oct 16 07:22:48 raspberrypi weewx[14709]:     ****    File 
>>> "/usr/share/weewx/user/radiationhours.py", line 203, in newArchiveRecord
>>> Oct 16 07:22:48 raspberrypi weewx[14709]:     ****      
>>> (event.record['sunshine_hours'], radiation, self.min_sunshine))
>>> Oct 16 07:22:48 raspberrypi weewx[14709]:     ****  TypeError: float 
>>> argument required, not NoneType
>>> Oct 16 07:22:48 raspberrypi weewx[14709]:     ****  Exiting.
>>>
>>>
>>> Am Samstag, 12. Oktober 2019 11:46:57 UTC+2 schrieb gjr80:
>>>>
>>>> If you must modify the code then yes that will do what you want 
>>>> provided there is no min_sunshine setting in weewx.conf.
>>>>
>>>> Gary
>>>>
>>>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/dcf9ca43-ef36-4699-bd75-2d705133c54f%40googlegroups.com.

Reply via email to