Hi
After fixing the bug in weewx.conf I discovered two more
1. the apache error.log file still encountered an error:
[Fri Jun 21 16:28:40.181183 2019] [php7:notice] [pid 28426] [client IP:port] PHP Notice: A non well formed numeric value encountered in /srv/www/html/w34/livedata.php on line 103, referer:
http://www.pocasi-kucerov.cz/w34/index.php[Fri Jun 21 16:28:40.181312 2019] [php7:notice] [pid 28426] [client IP:port] PHP Notice: A non well formed numeric value encountered in /srv/www/html/w34/livedata.php on line 104, referer:
http://www.pocasi-kucerov.cz/w34/index.php
I removed it quite easily, commented out lines 103 and 104 in livedata.php (in the realtime.txt file there are "NULL"). I only mention this in case someone has a similar problem.
2. The second is rather annoying and I don't know exactly what causes it. Appears in syslog:
Jun 21 07:55:40 server weewx[14238]: cheetahgenerator: Generate failed with exception '<type 'exceptions.TypeError'>'
Jun 21 07:55:40 server weewx[14238]: cheetahgenerator: **** Ignoring template /home/weewx/skins/w34skin/result.csv.tmpl
Jun 21 07:55:40 server weewx[14238]: cheetahgenerator: **** Reason: unsupported operand type(s) for +: 'float' and 'NoneType'
Jun 21 07:55:40 server weewx[14238]: **** Traceback (most recent call last):
Jun 21 07:55:40 server weewx[14238]: **** File "/home/weewx/bin/weewx/cheetahgenerator.py", line 332, in generate
Jun 21 07:55:40 server weewx[14238]: **** fd.write(str(compiled_template))
Jun 21 07:55:40 server weewx[14238]: **** File "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1005, in __str__
Jun 21 07:55:40 server weewx[14238]: **** rc = getattr(self, mainMethName)()
Jun 21 07:55:40 server weewx[14238]: **** File "_home_weewx_skins_w34skin_result_csv_tmpl.py", line 216, in respond
Jun 21 07:55:40 server weewx[14238]: **** TypeError: unsupported operand type(s) for +: 'float' and 'NoneType'
Jun 21 07:55:40 server weewx[14238]: cheetahgenerator: Generated 3 files for report w34skinReport in 3.98 seconds
However, this error is strange. It only appears after WeeWX reboots and only lasts until midnight! After the first archive record after midnight it disappears and appears again after the Weewx reboot. I think the error occurs on line 24 or 25 in the result.csv.tmpl file, but I don't know how to remove it. I don't mind, weewx often not restartin, but I have a script that backs up my mysql database every Monday and stopping weewx for the time of backup to avoid backup error.
Dne pátek 21. června 2019 13:48:13 UTC+2 Radoslav Drdla napsal(a):