Caught unrecoverable exception in generator user.wdtags.WDFileGenerator

Issue #10 resolved
nincehelser created an issue

Using latest commit:

Jun 18 19:27:20 raspberrypi weewx[3902]: reportengine: Caught unrecoverable exception in generator user.wdtags.WDFileGenerator Jun 18 19:27:20 raspberrypi weewx[3902]: * unsupported operand type(s) for : 'float' and 'NoneType' Jun 18 19:27:20 raspberrypi weewx[3902]: Traceback (most recent call last): Jun 18 19:27:20 raspberrypi weewx[3902]: File "/usr/share/weewx/weewx/reportengine.py", line 130, in run Jun 18 19:27:20 raspberrypi weewx[3902]: obj.start() Jun 18 19:27:20 raspberrypi weewx[3902]: File "/usr/share/weewx/weewx/reportengine.py", line 288, in start Jun 18 19:27:20 raspberrypi weewx[3902]: self.run() Jun 18 19:27:20 raspberrypi weewx[3902]: File "/usr/share/weewx/weewx/filegenerator.py", line 44, in run Jun 18 19:27:20 raspberrypi weewx[3902]: self.generateToDate(self.gen_ts) Jun 18 19:27:20 raspberrypi weewx[3902]: File "/usr/share/weewx/weewx/filegenerator.py", line 253, in generateToDate Jun 18 19:27:20 raspberrypi weewx[3902]: print >> _file, text Jun 18 19:27:20 raspberrypi weewx[3902]: File "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1005, in str Jun 18 19:27:20 raspberrypi weewx[3902]: rc = getattr(self, mainMethName)() Jun 18 19:27:20 raspberrypi weewx[3902]: File "_etc_weewx_skins_WD_testtags_php_tmpl.py", line 347, in respond Jun 18 19:27:20 raspberrypi weewx[3902]: TypeError: unsupported operand type(s) for : 'float' and 'NoneType' Jun 18 19:27:20 raspberrypi weewx[3902]: * Generator terminated...

Comments (26)

  1. Gary Roderick

    George, this error has typically been associated with testtags.php.tmpl wanting to use a weewx tag that does not exist or has not had its value set by the WD custom generator. Whilst a line number is mentioned it is hard to tie this to a specific point in the template. Does your setup not provide any of the standard weeewx tags (such as wind direction, rain rate etc). Lack of solar and UV data is a common issue but we have put in code to deal with these two. Gary

  2. nincehelser reporter

    I'm not sure about the tags issue as I don't quite understand exactly what they are.

    However, I'm using the "simulator" driver and through that I only pass 6 values to weewx: pressure, outTemp, outHumidity, wind speed, wind direction, and rain.

    Do I need to do something in the simulator driver to turn those into "tags"?

  3. Gary Roderick

    George, can you try putting '#errorCatcher Echo' as the first line of text in testatgs.php.tmpl (without the quotes of course). Hopefully that will allow testtags.php to be generated with the offending tags being highlighted in testtags.php. If it does produce testtags.php can you attach it here so we can see it.

  4. nincehelser reporter

    It doesn't seem to be generating a file. I assume it would be in the public_html directory?

  5. nincehelser reporter

    I found testtags.php. It's not where it's supposed to be on my system. It's showing up under /public_html/WD instead of /var/www/WD like I would expect.

    Anyway, it has 0 length, so nothing seems to be writing to it.

  6. nincehelser reporter

    I fixed my "public_html" problem. Should the WD directory be at the same level as weewx, or beneath it, or does it matter?

  7. Gary Roderick

    Hmm, that's not good. Does weewx still generate an error for testtags.php.tmpl? If it does is it the same message?

  8. nincehelser reporter

    It looks pretty much the same, but the last line number seems to be different.

    Jun 18 23:58:57 raspberrypi weewx[4271]: reportengine: Caught unrecoverable exception in generator user.wdtags.WDFileGenerator Jun 18 23:58:57 raspberrypi weewx[4271]: * unsupported operand type(s) for : 'float' and 'NoneType' Jun 18 23:58:57 raspberrypi weewx[4271]: Traceback (most recent call last): Jun 18 23:58:57 raspberrypi weewx[4271]: File "/usr/share/weewx/weewx/reportengine.py", line 130, in run Jun 18 23:58:57 raspberrypi weewx[4271]: obj.start() Jun 18 23:58:57 raspberrypi weewx[4271]: File "/usr/share/weewx/weewx/reportengine.py", line 288, in start Jun 18 23:58:57 raspberrypi weewx[4271]: self.run() Jun 18 23:58:57 raspberrypi weewx[4271]: File "/usr/share/weewx/weewx/filegenerator.py", line 44, in run Jun 18 23:58:57 raspberrypi weewx[4271]: self.generateToDate(self.gen_ts) Jun 18 23:58:57 raspberrypi weewx[4271]: File "/usr/share/weewx/weewx/filegenerator.py", line 253, in generateToDate Jun 18 23:58:57 raspberrypi weewx[4271]: print >> _file, text Jun 18 23:58:57 raspberrypi weewx[4271]: File "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1005, in str Jun 18 23:58:57 raspberrypi weewx[4271]: rc = getattr(self, mainMethName)() Jun 18 23:58:57 raspberrypi weewx[4271]: File "_etc_weewx_skins_WD_testtags_php_tmpl.py", line 2227, in respond Jun 18 23:58:57 raspberrypi weewx[4271]: TypeError: unsupported operand type(s) for : 'float' and 'NoneType' Jun 18 23:58:57 raspberrypi weewx[4271]: * Generator terminated...

  9. Gary Roderick

    Still the same type of error though. Clearly, I need to look into the weewx simulator function. Given Tom's thoroughness I would have expected it to be providing every possible weewx output. Will have to do some homework. Have to be the kids taxi now so will see what I can do tonight.

  10. Gary Roderick

    Have committed updated testtags.php.tmpl, clientraw.txt.tmpl and clientrawextra.txt.tmpl. Should work with Weewx simulator.

  11. nincehelser reporter

    Looking good!

    I'm only getting one error, and it doesn't look critical.

    Jun 20 05:50:57 raspberrypi weewx[6157]: filegenerator: Caught exception "<class 'NameMapper.NotFound'>" Jun 20 05:50:57 raspberrypi weewx[6157]: * Message: "cannot find 'min' while searching for 'day.extraTemp2.min' in template /etc/weewx/skins/WD/customclientraw.txt.tmpl" Jun 20 05:50:57 raspberrypi weewx[6157]: * Ignoring template and continuing.

  12. Fernando

    ninecehelser,

    Thanks for the confirmation.... I open Issue #11... Can you take a look and see if you can see the same issues I am seeing besides the date?

    Thanks!

  13. Gary Roderick

    Ok, extraTemp2.min issue first. To cut a long story short extraTemp1 and extraTemp2 are being used to hold humidex and apparent temperature respectively and to pull in min or max etc values they need to be included in the stats database. For a clean install with weewxwd the relevant fields would have been automatically included in the stats database when it was built. For an existing system we need to make sure the correct code is in $BIN_ROOT/user/schemas.py and then delete and rebuild the stats database. If you downloaded the schemas.py file with weewxwd then it should be fine. You can check this by opening schemas.py and check that extraTemp2 is included in the stats_types list.If not it needs to be added to the list. Once this is done you need to delete your stats database, in my case stats.sdb, don't delete the archive database. Probably best to back these up just in case. If you stop and restart weewx it should automatically rebuild the stats database with extraTemp2 in it. ExtraTemp2 error should disappear. As for the time, its undoubtedly due to time format differences, bet you guys use M/D/Y format, Greg and I are in Australia and use D/M/Y format. xcom7 your link did not work for me, no response at all. What templates are you using, is there a date format setting in a config/settings file?

  14. Gary Roderick

    Alternatively, customclientraw.txt.tmpl is only there to drive the steel series gauges (I believe) so you can just comment it out in skin.conf to prevent it being generated.

  15. Gary Roderick

    Ok, on the basis of issue #10 relating to (1) testtags and clientraw files not being generated and (2) run time errors I will mark this issue as closed.

  16. Log in to comment