For the record using the following try catch statement across a #include or across the whole page juste saved my debugging life:
It just bring meaningful information (sometimes without the line #), but I could fix my 2 templates now. Regards, On Friday, June 18, 2021 at 6:33:07 AM UTC+2 [email protected] wrote: > Hi Gjr80, > > Thank you for the answer. > > As far a log go, they do not show errors, and just give the list count of > reports generated and copied. Log debug 1 does the same. > > Running wihthout the inc generates the file, and a series of : > here > #stop > > has helped me pin identify the loop where the report breaks. I will give a > bit more time to this, and should be able to figure what is missing from > the forecast that kills the output. > > The debug method is quite crude, but it should get me going. But I guess > that next time I start something on a skin, I'll limit the cheetah process > to generating a json file. and use more modern ways of building and > debugging the output side of the thing. > > Thanks again > > Regards, > > On Thursday, June 17, 2021 at 1:35:35 AM UTC+2 gjr80 wrote: > >> First thing is the WeeWX log, sometimes it is not the error you are >> looking for in the log but rather what is missing from the log. What does >> the log show with debug = 1 >> >> Second thing, the iconic-color.html.tmpl is pretty basic with the >> majority of the 'work' being done via an include. Chances are the issue is >> in the include file, but what happens if you comment out the include? Is >> iconic-color.html generated ? >> >> Troubleshooting Cheetah template issues can be notoriously tricky. It >> generally comes down to where the error is and how much (or how helpful) >> error output you get. Common runtime errors are a variable/tag being None >> and the code being unable to handle that, though these types of errors >> generally provide an error message. I don't know whether using an include >> can mask some error output, I have never had to troubleshoot any includes, >> perhaps try (temporarily) adding the include code into >> iconic-color.html.tmpl. >> >> You may have to resort temporarily removing portions of the template code >> until you find the portion that causes the error, then progressively >> restore the code until you find the portion that causes the error. Slow and >> tedious but can be sped up if you can temporarily shorten your archive >> interval and if you systematically work through your code. >> >> Gary >> On Wednesday, 16 June 2021 at 14:50:10 UTC+10 [email protected] wrote: >> >>> Hello, >>> >>> Thank to a wipe of my RPI3 sd card, I am reinstalling my station from >>> scratch. >>> Weewx with SDR has restarted fine, and I am currently fighting with >>> cheetah to try figure what I messed in my templates. >>> >>> I am using the forecast skin with a varation to have the iconic template >>> with the new WU icons. >>> That setup WAS working but I obviously did not properly commit all files >>> to the repo. >>> (BTW the repo is : https://github.com/sbsrouteur/weewx-forecast) >>> >>> cloning repo, installing the extension goes fine. Upon the 1st report >>> run, all the files except 'iconic-color.html' get generated to the forecast >>> target folder. (All templates from the standard forecast template are >>> filled with proper data using WU forecast data) >>> >>> I have tried running cheetah3 compile index.tmpl (after renaming my >>> iconic-color.html.tmpl to index.tmpl) and it compiles an index.py fine. >>> running the py file with pyhton3 output html looking consistent with my >>> expected template. >>> >>> I have set debug = 1 (even 2) in weewx, run in daemon or cli, I do not >>> get any cheetah error when generating the reports. It just seems ignored. >>> >>> Is there something obvious I forgot to get this running? (or to get >>> runtime information from cheetah that would point to the problem) >>> >>> Regards, >>> >> -- You received this message because you are subscribed to the Google Groups "weewx-development" 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-development/eb81e3a8-536f-442c-bbb4-ca238f42855fn%40googlegroups.com.
