check your file - it looks as though there is now a 'stray' letter v in the file as a result of your editing!! A typo of somekind clearly!!
On Wednesday, 16 October 2019 14:57:33 UTC+3, Stefan wrote: > > Thx Gary. > I made the change. However, it does not work either. There is still the > error message: > > Oct 16 13:54:28 raspberrypi weewx[12153]: engine: Caught unrecoverable > exception in engine: > Oct 16 13:54:28 raspberrypi weewx[12153]: **** name 'v' is not defined > Oct 16 13:54:28 raspberrypi weewx[12153]: **** Traceback (most recent > call last): > Oct 16 13:54:28 raspberrypi weewx[12153]: **** File > "/usr/share/weewx/weewx/engine.py", line 884, in main > Oct 16 13:54:28 raspberrypi weewx[12153]: **** engine = > engine_class(config_dict) > Oct 16 13:54:28 raspberrypi weewx[12153]: **** File > "/usr/share/weewx/weewx/engine.py", line 78, in __init__ > Oct 16 13:54:28 raspberrypi weewx[12153]: **** > self.loadServices(config_dict) > Oct 16 13:54:28 raspberrypi weewx[12153]: **** File > "/usr/share/weewx/weewx/engine.py", line 142, in loadServices > Oct 16 13:54:28 raspberrypi weewx[12153]: **** > self.service_obj.append(weeutil.weeutil._get_object(svc)(self, config_dict)) > Oct 16 13:54:28 raspberrypi weewx[12153]: **** File > "/usr/share/weewx/weeutil/weeutil.py", line 1130, in _get_object > Oct 16 13:54:28 raspberrypi weewx[12153]: **** mod = > __import__(module) > Oct 16 13:54:28 raspberrypi weewx[12153]: **** File > "/usr/share/weewx/user/radiationhours.py", line 174, in <module> > Oct 16 13:54:28 raspberrypi weewx[12153]: **** v > Oct 16 13:54:28 raspberrypi weewx[12153]: **** NameError: name 'v' is > not defined > Oct 16 13:54:28 raspberrypi weewx[12153]: **** Exiting. > > > Am Mittwoch, 16. Oktober 2019 09:27:48 UTC+2 schrieb gjr80: >> >> 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/5ac797e6-1865-4e9d-8f95-4a73c162fa8a%40googlegroups.com.
