Ah - must have lost them along the way. Thanks for explaining. On Friday, 12 October 2018 18:21:46 UTC+1, Andrew Milner wrote: > > The original had #raw and #end raw around the js code - so that cheetah > would ignore the section - as the comment says - to avoid the dollars > causing confusion!! > > > > On Friday, 12 October 2018 17:45:06 UTC+3, Auchtermuchty Weather wrote: >> >> I am getting this error when I run wee_reports for the Bootstrap skin. >> This is using WeeWx 3.8.2 on an RPi running the latest Stretch Lite, Debian >> 9. >> >> From /var/log/syslog: >> >> Oct 12 14:07:50 sgcweather wee_reports[28336]: cheetahgenerator: Generate >> failed with exception '<class 'NameMapper.NotFound'>' >> Oct 12 14:07:50 sgcweather wee_reports[28336]: cheetahgenerator: **** >> Ignoring template /home/weewx/skins/Bootstrap/index.html.tmpl >> Oct 12 14:07:50 sgcweather wee_reports[28336]: cheetahgenerator: **** >> Reason: cannot find 'document' >> Oct 12 14:07:50 sgcweather wee_reports[28336]: **** Traceback (most >> recent call last): >> Oct 12 14:07:50 sgcweather wee_reports[28336]: **** File >> "/home/weewx/bin/weewx/cheetahgenerator.py", line 330, in generate >> Oct 12 14:07:50 sgcweather wee_reports[28336]: **** print >> _file, >> compiled_template >> Oct 12 14:07:50 sgcweather wee_reports[28336]: **** File >> "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1005, in >> __str__ >> Oct 12 14:07:50 sgcweather wee_reports[28336]: **** rc = >> getattr(self, mainMethName)() >> Oct 12 14:07:50 sgcweather wee_reports[28336]: **** File >> "_home_weewx_skins_Bootstrap_index_html_tmpl.py", line 216, in respond >> Oct 12 14:07:50 sgcweather wee_reports[28336]: **** NotFound: cannot >> find 'document' >> Oct 12 14:07:53 sgcweather wee_reports[28336]: cheetahgenerator: >> Generated 9 files for report HTMLPages in 28.55 seconds >> >> Unfortunately it doesn't give the name of what it can't find. >> >> The index.html.tmpl file exists: >> >> $ ls /home/weewx/skins/Bootstrap/index.html.tmpl >> /home/weewx/skins/Bootstrap/index.html.tmpl >> >> It has three #include statements, the files they refer to all exist as >> well so I'm not sure what the error is. >> >> #include "gauges.html.tmpl" >> #include "stationinfo.html.tmpl" >> #include "graphs.html.tmpl" >> >> >> Index.html.tmpl: >> >> <!DOCTYPE html> >> <html lang="en"> >> <head> >> <meta charset="utf-8"> >> <meta http-equiv="X-UA-Compatible" content="IE=edge"> >> <meta name="viewport" content="width=device-width, initial-scale=1"> >> <title>$BootstrapLabels.title</title> >> <!-- Bootstrap --> >> <link href="css/bootstrap.min.css" rel="stylesheet"> >> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and >> media queries --> >> <!-- WARNING: Respond.js doesn't work if you view the page via >> file:// --> >> <!--[if lt IE 9]> >> <script src=" >> https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> >> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js >> "></script> >> <![endif]--> >> </head> >> <body> >> <!-- Menu navbar --> >> <div class="navbar navbar-inverse" role="navigation"> >> <div class="navbar-header"> >> <button type="button" class="navbar-toggle collapsed" >> data-toggle="collapse" data-target=".navbar-collapse"> >> <span class="sr-only">Toggle navigation</span> >> <span class="icon-bar"></span> >> <span class="icon-bar"></span> >> <span class="icon-bar"></span> >> <span class="icon-bar"></span> >> </button> >> <a class="navbar-brand" >> href="$BootstrapLabels.location_href">$station.location</a> >> </div> <!-- navbar-header --> >> <div class="navbar-collapse collapse"> >> <ul class="nav navbar-nav"> >> <li class="active"><a >> href="#">$BootstrapLabels.headings.front_page</a></li> >> <li><a >> href="stats.html">$BootstrapLabels.headings.stats</a></li> >> <li><a >> href="history.html">$BootstrapLabels.headings.history</a></li> >> <li><a href="news.html">$BootstrapLabels.headings.news</a></li> >> <li><a >> href="about.html">$BootstrapLabels.headings.about</a></li> >> </ul> >> <p class="navbar-text >> navbar-right">$BootstrapLabels.headings.last_update $current.dateTime</p> >> </div><!--/.nav-collapse --> >> </div> <!-- /.navbar-inverse --> >> <!-- Main container --> >> <div class="container"> >> <div class="row"> >> <div class="col-md-4"> >> <!-- Gauges --> >> #include "gauges.html.tmpl" >> <!-- Station info --> >> #include "stationinfo.html.tmpl" >> </div> <!-- col-md-4 --> >> <!-- Timespan Navigation --> >> <div class="col-md-8 main"> >> <ul class="nav nav-pills"> >> <li class="active"><a >> href="#">$BootstrapLabels.timespans.day</a></li> >> <li><a >> href="week.html">$BootstrapLabels.timespans.week</a></li> >> <li><a >> href="month.html">$BootstrapLabels.timespans.month</a></li> >> <li><a >> href="year.html">$BootstrapLabels.timespans.year</a></li> >> </ul> <!-- nav-pills --> >> <br> >> <!-- Graphs --> >> #include "graphs.html.tmpl" >> </div> <!-- col-md-8 main --> >> </div> <!-- row --> >> </div> <!-- container --> >> <hr> >> <footer> >> <p>© SGC 2018</p> >> </footer> >> <!-- 'raw' makes Cheetah skip this section so it doesn't get confused by >> the dollar signs in the js --> >> <!-- jQuery (necessary for Bootstrap's JavaScript plugins) --> >> <script src=" >> https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js >> "></script> >> <!-- Include all compiled plugins (below), or include individual >> files as needed --> >> <script src="js/bootstrap.min.js"></script> >> <!-- Lightbox --> >> <script src="js/ekko-lightbox.min.js"></script> >> <script type="text/javascript"> >> $(document).delegate('*[data-toggle="lightbox"]', 'click', >> function(event) { >> event.preventDefault(); >> $(this).ekkoLightbox(); >> }); >> </script> >> </body> >> </html> >> >> gauges.html.tmp: >> <!-- START Gauge panel --> >> <div class="row"> >> <div class="col-md-6" align="center"> >> <img src="windRoseGauge.png" alt=""> >> <h5>Wind Rose</h5> >> <h5>windRoseGuage.png</h5> >> </div> <!-- col-md-6 --> >> </div> <!-- row --> >> <div class="row"> >> <div class="col-md-6" align="center"> >> <img src="outTempGauge.png" alt=""> >> <h5>$Labels.Generic.outTemp</h5> >> <h5>outTempGauge.png</h5> >> </div> <!-- col-md-6 --> >> <div class="col-md-6" align="center"> >> <img src="barometerGauge.png" alt=""> >> <h5>$Labels.Generic.barometer</h5> >> <h5>barometerGauge.png</h5> >> </div> <!-- col-md-6 --> >> </div> <!-- row --> >> <div class="row"> >> <div class="col-md-6" align="center"> >> <img src="windDirGauge.png" alt=""> >> <h5>$Labels.Generic.windDir</h5> >> <h5>windDirGauge.png</h5> >> </div> <!-- col-md-6 --> >> <div class="col-md-6" align="center"> >> <img src="outHumidityGauge.png" alt=""> >> <h5>$Labels.Generic.outHumidity</h5> >> <h5>outHumidityGauge.png</h5> >> </div> <!-- col-md-6 --> >> </div> <!-- row --> >> <div class="row"> >> <div class="col-md-6" align="center"> >> <img src="windSpeedGauge.png" alt=""> >> <h5>$Labels.Generic.windSpeed</h5> >> <h5>windSpeedGuage.png</h5> >> </div> <!-- col-md-6 --> >> <div class="col-md-6" align="center"> >> <img src="windGustGauge.png" alt=""> >> <h5>$Labels.Generic.windGust</h5> >> <h5>windGustGuage.png</h5> >> </div> <!-- col-md-6 --> >> </div> <!-- row --> >> <!-- END Gauge panel --> >> >> stationinfo.html.tmpl: >> <!-- START stationinfo.html.tmpl --> >> <div class="row"> >> <table class="table table-hover"> >> <tbody> >> <tr> >> <td>$BootstrapLabels.status.latitude</td> >> <td>$station.latitude[0]° >> $station.latitude[1]' $station.latitude[2]</td> >> </tr> >> <tr> >> <td>$BootstrapLabels.status.longitude</td> >> <td>$station.longitude[0]° >> $station.longitude[1]' $station.longitude[2]</td> >> </tr> >> <tr> >> <td>$BootstrapLabels.status.altitude</td> >> <td>$station.altitude</td> >> </tr> >> <tr> >> <td>$BootstrapLabels.status.station_uptime</td> >> <td>$station.uptime</td> >> </tr> >> <tr> >> <td>$BootstrapLabels.status.server_uptime</td> >> <td>$station.os_uptime</td> >> </tr> >> </tbody> >> </table> >> </div> <!-- row --> >> <!-- END stationinfo.html.tmpl --> >> >> graphs.html.tmpl is similar but larger. I'm sure you want some info I've >> not provided, ask away. >> >>
-- 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]. For more options, visit https://groups.google.com/d/optout.
