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):
>
> Yes, I found out before. Since version 3.9.0, weewx.conf takes precedence 
> over skin.conf, so I had to remove all [unit] sections etc. from weewx.conf 
> and move them to skin.conf of each skin. I didn't think it not worked with 
> w34. The second option is to add the [units] section to define each skin in 
> weewx.conf, which didn't seem to me appropriate because weewx.conf grew 
> disproportionately (not only because of units, but also labels, etc.) and 
> also because of every minor change in weewx.conf it was necessary to 
> restart weewx, but the change in skin.conf does not need restart.
> Radek
>
> Dne pátek 21. června 2019 7:00:10 UTC+2 gjr80 napsal(a):
>>
>> Hi,
>>
>> If you were running a a pre-3.9.0 version of WeeWX you may have been 
>> affected by the changes to skin defaults 
>> <http://weewx.com/docs/upgrading.htm#Skin_defaults> introduced in WeeWX 
>> 3.9.0. The upshot is if you had previously customised a skin.conf to use 
>> non-US customary units then the upgrade to 3.9.x would override those 
>> customisations and revert to US customary units. The solution, as you have 
>> found, is to do those customisations/overrides in weewx.conf.
>>
>> Gary
>>
>> On Friday, 21 June 2019 14:52:21 UTC+10, Radoslav Drdla wrote:
>>>
>>> Hi All
>>> Fault removed. In weewx.conf I missed the [[Units]] section of the w34 
>>> skin definition. I assumed that it is enough to place it in the skin.conf, 
>>> because I have some skins in Czech and some in English and I solved it in 
>>> skin.conf for individual skins.
>>> All I have to do is replace some of the labels, because not everything 
>>> can be done with "langxx.php".
>>> Thank you all for trying to help.
>>>
>>> Dne úterý 18. června 2019 19:27:25 UTC+2 Radoslav Drdla napsal(a):
>>>>
>>>> Hi, I have weewx 3.9.1 installed and I added W34 skin. I had a few 
>>>> problems I solved, but with one I don't know how to go on. The thing is 
>>>> that the data from weewx database is in Imperial units (recommended) and 
>>>> templates are converted to metric. But the W34skin data from 
>>>> "realtime.txt" 
>>>> is displayed correctly, but leaves the data it receives directly from the 
>>>> database in its original units and then the skin displays nonsense. E.g. 
>>>> the current temperature is 25.1 ° C, but the Max / min temperatures are 
>>>> 81.7 ° C / 59.9 ° C (which are actually temperatures in ° F), similarly 
>>>> the 
>>>> wind speed is in km / h, but the values correspond to mph etc.
>>>> My database has data since 2013 and I don't want to lose data or 
>>>> convert it to a metric system. Is it possible to solve it or is W34 skin 
>>>> unusable for me?
>>>>
>>>> You can see here: http://www.pocasi-kucerov.cz/w34/index.php
>>>>
>>>>

-- 
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/304a1e1a-41ec-4d0a-bf04-d20887040ae7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to