reportengine: Caught unrecoverable exception in generator user.gaugeengine.GaugeGenerator

199 views
Skip to first unread message

Roger Knobbe

unread,
Feb 19, 2016, 1:29:36 PM2/19/16
to weewx-user
I'm getting recurring errors from reportengine, looks like every time the hourly cron runs.  I'm connected to a WMR88 with a RaspberryPi.  Any ideas?

Feb 19 10:17:01 weewx /USR/SBIN/CRON[27372]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Feb 19 10:20:23 weewx weewx[2362]: manager: added record 2016-02-19 10:20:00 PST (1455906000) to database 'weewx.sdb'
Feb 19 10:20:24 weewx weewx[2362]: manager: added record 2016-02-19 10:20:00 PST (1455906000) to daily summary in 'weewx.sdb'
Feb 19 10:20:24 weewx weewx[2362]: restx: Wunderground-PWS: Published record 2016-02-19 10:20:00 PST (1455906000)
Feb 19 10:20:36 weewx weewx[2362]: cheetahgenerator: Generated 14 files for report StandardReport in 11.89 seconds
Feb 19 10:20:41 weewx weewx[2362]: genimages: Generated 12 images for StandardReport in 4.66 seconds
Feb 19 10:20:41 weewx weewx[2362]: reportengine: copied 0 files to /var/www/weewx
Feb 19 10:20:42 weewx weewx[2362]: cheetahgenerator: Generated 1 files for report simple in 1.39 seconds
Feb 19 10:20:48 weewx weewx[2362]: genimages: Generated 16 images for simple in 5.99 seconds
Feb 19 10:20:49 weewx weewx[2362]: reportengine: Caught unrecoverable exception in generator user.gaugeengine.GaugeGenerator
Feb 19 10:20:49 weewx weewx[2362]:         ****  'ascii' codec can't encode character u'\xb0' in position 4: ordinal not in range(128)
Feb 19 10:20:49 weewx weewx[2362]:         ****  Traceback (most recent call last):
Feb 19 10:20:49 weewx weewx[2362]:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 140, in run
Feb 19 10:20:49 weewx weewx[2362]:         ****      obj.start()
Feb 19 10:20:49 weewx weewx[2362]:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 170, in start
Feb 19 10:20:49 weewx weewx[2362]:         ****      self.run()
Feb 19 10:20:49 weewx weewx[2362]:         ****    File "/usr/share/weewx/user/gaugeengine.py", line 121, in run
Feb 19 10:20:49 weewx weewx[2362]:         ****      self.gen_gauges()
Feb 19 10:20:49 weewx weewx[2362]:         ****    File "/usr/share/weewx/user/gaugeengine.py", line 171, in gen_gauges
Feb 19 10:20:49 weewx weewx[2362]:         ****      ret = self.gen_gauge(gauge, plot_options, img_file)
Feb 19 10:20:49 weewx weewx[2362]:         ****    File "/usr/share/weewx/user/gaugeengine.py", line 383, in gen_gauge
Feb 19 10:20:49 weewx weewx[2362]:         ****      gauge.render()
Feb 19 10:20:49 weewx weewx[2362]:         ****    File "/usr/share/weewx/user/gauges.py", line 379, in render
Feb 19 10:20:49 weewx weewx[2362]:         ****      self.draw_labels()  # Reading/Text labels
Feb 19 10:20:49 weewx weewx[2362]:         ****    File "/usr/share/weewx/user/gauges.py", line 343, in draw_labels
Feb 19 10:20:49 weewx weewx[2362]:         ****      textsize = self.text_font.getsize(text)
Feb 19 10:20:49 weewx weewx[2362]:         ****  UnicodeEncodeError: 'ascii' codec can't encode character u'\xb0' in position 4: ordinal not in range(128)
Feb 19 10:20:49 weewx weewx[2362]:         ****  Generator terminated...
Feb 19 10:20:50 weewx weewx[2362]: historygenerator.pyc: Generated 5 tables in 0.67 seconds
Feb 19 10:20:59 weewx weewx[2362]: cheetahgenerator: Generated 10 files for report HTMLPages in 9.87 seconds
Feb 19 10:20:59 weewx weewx[2362]: reportengine: copied 0 files to /var/www/weewx/Bootstrap
Feb 19 10:21:00 weewx weewx[2362]: reportengine: Caught unrecoverable exception in generator user.translategenerator.ImageGeneratorTranslated
Feb 19 10:21:00 weewx weewx[2362]:         ****  coordinate list must contain exactly 1 coordinate
Feb 19 10:21:00 weewx weewx[2362]:         ****  Traceback (most recent call last):
Feb 19 10:21:00 weewx weewx[2362]:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 140, in run
Feb 19 10:21:00 weewx weewx[2362]:         ****      obj.start()
Feb 19 10:21:00 weewx weewx[2362]:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 170, in start
Feb 19 10:21:00 weewx weewx[2362]:         ****      self.run()
Feb 19 10:21:00 weewx weewx[2362]:         ****    File "/usr/share/weewx/weewx/imagegenerator.py", line 31, in run
Feb 19 10:21:00 weewx weewx[2362]:         ****      self.genImages(self.gen_ts)
Feb 19 10:21:00 weewx weewx[2362]:         ****    File "/usr/share/weewx/weewx/imagegenerator.py", line 213, in genImages
Feb 19 10:21:00 weewx weewx[2362]:         ****      image = plot.render()
Feb 19 10:21:00 weewx weewx[2362]:         ****    File "/usr/share/weewx/weeplot/genplot.py", line 174, in render
Feb 19 10:21:00 weewx weewx[2362]:         ****      self._renderTopBand(draw)
Feb 19 10:21:00 weewx weewx[2362]:         ****    File "/usr/share/weewx/weeplot/genplot.py", line 380, in _renderTopBand
Feb 19 10:21:00 weewx weewx[2362]:         ****      font=unit_label_font)
Feb 19 10:21:00 weewx weewx[2362]:         ****    File "/usr/lib/python2.7/dist-packages/PIL/ImageDraw.py", line 270, in text
Feb 19 10:21:00 weewx weewx[2362]:         ****      self.draw.draw_bitmap(xy, mask, ink)
Feb 19 10:21:00 weewx weewx[2362]:         ****  TypeError: coordinate list must contain exactly 1 coordinate
Feb 19 10:21:00 weewx weewx[2362]:         ****  Generator terminated...
Feb 19 10:21:01 weewx weewx[2362]: reportengine: Caught unrecoverable exception in generator user.translategenerator.ImageGeneratorTranslated
Feb 19 10:21:01 weewx weewx[2362]:         ****  coordinate list must contain exactly 1 coordinate
Feb 19 10:21:01 weewx weewx[2362]:         ****  Traceback (most recent call last):
Feb 19 10:21:01 weewx weewx[2362]:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 140, in run
Feb 19 10:21:01 weewx weewx[2362]:         ****      obj.start()
Feb 19 10:21:01 weewx weewx[2362]:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 170, in start
Feb 19 10:21:01 weewx weewx[2362]:         ****      self.run()
Feb 19 10:21:01 weewx weewx[2362]:         ****    File "/usr/share/weewx/weewx/imagegenerator.py", line 31, in run
:

Roger Knobbe

unread,
Feb 19, 2016, 1:32:10 PM2/19/16
to weewx-user
Running 3.4.0 by the way

Andrew Milner

unread,
Feb 19, 2016, 1:37:29 PM2/19/16
to weewx-user
Perhaps you could say a little more about how you are set up, what has changed recently and so on.  What has cron got to do with weewx??  Looks as though you have set ascii for gauge generator (not  a standard part of weewx) rather than utf8 - so maybe you have a weewx.conf setting that is overriding the skins.  Also see you are using the bootstrap skin - also not a part of standard weewx.

Thomas Keffer

unread,
Feb 19, 2016, 2:43:35 PM2/19/16
to weewx-user
You have a Unicode character with code point 0xb0 (the degree sign), which cannot be converted to ASCII.

The  solutions:
1. Find the character (the degree sign) and use something else;
2. appeal to the author of gauges.py to add an explicit conversion from Unicode to UTF8 (instead of to the default ASCII).

-tk



--
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.
For more options, visit https://groups.google.com/d/optout.

Roger Knobbe

unread,
Feb 19, 2016, 7:46:21 PM2/19/16
to weewx-user
Thanks, that helped.  I originally configured using Bootstrap on 3.3.1, and I was probably experiencing the 0xb0 error the whole time without noticing in the log file. After I removed the 0xb0 (degree symbols) from the Bootstrap/skin.conf I found that my config had some flaws in it so I redid from scratch for 3.4.0 and all seems to be working now.  Somehow there are still some Angstrom characters in the gauges, even after fixing the skins, but at least I'm not getting loads of error messages.


temperatures
Reply all
Reply to author
Forward
0 new messages