Generate: Ignoring template /etc/weewx/skins/exfoliation/forecast.html.tmpl: Reason: 'U'

129 views
Skip to first unread message

Matt

unread,
Oct 25, 2019, 12:24:05 PM10/25/19
to weewx-user
Hi,

I've searched the group and the internet generally for this but cannot find any guidance.  I've set up the exfoliation skin but I'm getting an error that I simply can't work out...


Oct 25 17:20:30 weatherpi weewx[2455]: cheetahgenerator: Generate failed with exception '<type 'exceptions.KeyError'>'
Oct 25 17:20:30 weatherpi weewx[2455]: cheetahgenerator: **** Ignoring template /etc/weewx/skins/exfoliation/forecast.html.tmpl
Oct 25 17:20:30 weatherpi weewx[2455]: cheetahgenerator: **** Reason: 'U'
Oct 25 17:20:30 weatherpi weewx[2455]: ****  Traceback (most recent call last):
Oct 25 17:20:30 weatherpi weewx[2455]: ****    File "/usr/share/weewx/weewx/cheetahgenerator.py", line 332, in generate
Oct 25 17:20:30 weatherpi weewx[2455]: ****      fd.write(str(compiled_template))
Oct 25 17:20:30 weatherpi weewx[2455]: ****    File "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1045, in __str__
Oct 25 17:20:30 weatherpi weewx[2455]: ****      rc = getattr(self, mainMethName)()
Oct 25 17:20:30 weatherpi weewx[2455]: ****    File "_etc_weewx_skins_exfoliation_forecast_html_tmpl.py", line 336, in respond
Oct 25 17:20:30 weatherpi weewx[2455]: ****    File "_etc_weewx_skins_exfoliation_forecast_html_tmpl.py", line 113, in __errorCatcher7
Oct 25 17:20:30 weatherpi weewx[2455]: ****    File "<string>", line 1, in <module>
Oct 25 17:20:30 weatherpi weewx[2455]: ****  KeyError: 'U'


I've checked my weewx.conf and skin.conf but I can't put my finger on anything.  

Can anyone point me in the right direction please?

Many thanks,

Matt

Andrew Milner

unread,
Oct 25, 2019, 12:32:29 PM10/25/19
to weewx-user
the fact that it is line 1 throwing the error makes me suspect a line trying to say the encoding is UTF-8 which has acquired a typo of some kind.  If indeed there is a UTF8 directive at the top of the file try and delete it and retype the line - making sure to use a text editor like nano for the editing.

Matt

unread,
Oct 25, 2019, 12:58:30 PM10/25/19
to weewx...@googlegroups.com
Thank you for the response and please forgive my ignorance but which file, the template file?

--
You received this message because you are subscribed to a topic in the Google Groups "weewx-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/rYgFqb3jRhI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/26f88e7f-4314-4fef-af34-0259f8db4327%40googlegroups.com.

Matt

unread,
Oct 25, 2019, 2:48:58 PM10/25/19
to weewx-user
Hi,

I've retyped the lines with UTF-8, I've re-written the META tags per W3SCHOOLS convention and I've even deleted them but each time I am getting this same error.  Thoroughly confused.

Anyone know what this could be?

Thanks,

Matt

gjr80

unread,
Oct 25, 2019, 8:40:51 PM10/25/19
to weewx-user
Hi,

These sorts of errors can be particularly challenging to track down, the main reason being the line numbers reported are generally meaningless as the line numbers refer to a temporary file used by Cheetah that unfortunately we do not have access to. Sometimes the best approach is to remove portions of the template until you identify the line(s) causing the error, though this doe snot work well for complex templates. I know you have looked in weewx.conf and the exfoliation skin.conf, but we have not nor do we have any idea of your config. Could you please post both. Careful with weewx.conf as it may contain sensitive info such as usernames, password, keys etc. You can use wee_debug to produce a report and post the report, wee_debug should obfuscate most sensitive info but check first just in case.

Can you also post a startup debug log. Edit weewx.conf, set debug = 1, save weewx.conf and restart WeeWX. Post the log from WeeWX startup through until the error trace is complete, don't edit or skip anything, it is important to see the complete startup.

Have you made any changes, no matter how inconsequential, to any of the exfoliation skin files? If so broadly speaking what did you change? Also, has the template ever worked or has it always failed?

Gary

Matt

unread,
Oct 27, 2019, 10:18:52 AM10/27/19
to weewx-user
HI Gary,

Thank you for your response.  I have attached everything requested.  Let me know if there is anything else needed.

I have changed some of the URLs for the weather gifs and images.  They are the only changes i've made.

Thanks,

Matt
weewx.debug
skin.conf
Log.txt

p q

unread,
Oct 27, 2019, 11:14:54 AM10/27/19
to weewx...@googlegroups.com
What's in forecast.html.tmpl? 

I'm guessing it doesn't like 
   current_forecast_source = UKMO

If you comment that out or change it to something different, do you get the same error? Try changing it to some nonsense like XXXX and see what happens.




--
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 weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/7f2a51b6-0b40-40a7-8c65-4368e4d2f153%40googlegroups.com.


--
Peter Quinn
(415)794-2264

Matt

unread,
Oct 27, 2019, 11:48:38 AM10/27/19
to weewx-user
Hi,

I've changed UKMO to XXXX, WU, 'UKMO' and it's still failing with exactly the same error.  I've attached the forecast template.  I believe it produces a forecast page, like the one at http://sailing.mit.edu/weather/forecast.html.

Regards,

Matt
To unsubscribe from this group and stop receiving emails from it, send an email to weewx...@googlegroups.com.


--
Peter Quinn
(415)794-2264
forecast.html.tmpl

p q

unread,
Oct 27, 2019, 12:33:32 PM10/27/19
to weewx...@googlegroups.com
I see a minor difference between the original and yours where you have 
<meta charset = "UTF-8">

and the original has
<meta charset=utf-8' />

I'm not set up to debug this, so I can't tell if this is a problem or not. It doesn't look like you have changed anything else in this file, so maybe you might go back to the original template file.


To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/07040a40-c2d4-437b-b5eb-bfb63149ca88%40googlegroups.com.


--
Peter Quinn
(415)794-2264
Reply all
Reply to author
Forward
0 new messages