Hello, Daniel.

What version of Python are you using?

What is 'user.translategenerator.ImageGeneratorTranslated'? It is not part
of WeeWX. Most likely, it is creating image labels, which are not in
unicode.

-tk

On Thu, Oct 8, 2020 at 3:56 AM [email protected] <
[email protected]> wrote:

> Hello,
>
> I finally updated yesterday to version 4.1. Unfortunately I get the well
> known UnicodeEncodeError in imagegenerator when processing spanish
> characters. I have tried all the tips I have found (reinstalling the font,
> checking locale, etc).
>
> It is weird, because some characters are being correctly generated (í) but
> some others don't (ó). And finally a character cannot not be generated at
> all and imagegenerator fails:
>
>
> Oct  8 12:52:06 TrastoRaspberry weewx[25710] ERROR weewx.reportengine:
> Caught unrecoverable exception in generator
> 'user.translategenerator.ImageGeneratorTranslated'
> Oct  8 12:52:06 TrastoRaspberry weewx[25710] ERROR weewx.reportengine:
>      ****  'ascii' codec can't decode byte 0xc3 in position 7: ordinal not
> in range(128)
> Oct  8 12:52:06 TrastoRaspberry weewx[25710] ERROR weewx.reportengine:
>      ****  Traceback (most recent call last):
> Oct  8 12:52:06 TrastoRaspberry weewx[25710] ERROR weewx.reportengine:
>      ****    File "/usr/share/weewx/weewx/reportengine.py", line 197, in run
> Oct  8 12:52:06 TrastoRaspberry weewx[25710] ERROR weewx.reportengine:
>      ****      obj.start()
> Oct  8 12:52:06 TrastoRaspberry weewx[25710] ERROR weewx.reportengine:
>      ****    File "/usr/share/weewx/weewx/reportengine.py", line 280, in
> start
> Oct  8 12:52:06 TrastoRaspberry weewx[25710] ERROR weewx.reportengine:
>      ****      self.run()
> Oct  8 12:52:06 TrastoRaspberry weewx[25710] ERROR weewx.reportengine:
>      ****    File "/usr/share/weewx/weewx/imagegenerator.py", line 41, in
> run
> Oct  8 12:52:06 TrastoRaspberry weewx[25710] ERROR weewx.reportengine:
>      ****      self.genImages(self.gen_ts)
> Oct  8 12:52:06 TrastoRaspberry weewx[25710] ERROR weewx.reportengine:
>      ****    File "/usr/share/weewx/weewx/imagegenerator.py", line 263, in
> genImages
> Oct  8 12:52:06 TrastoRaspberry weewx[25710] ERROR weewx.reportengine:
>      ****      image = plot.render()
> Oct  8 12:52:06 TrastoRaspberry weewx[25710] ERROR weewx.reportengine:
>      ****    File "/usr/share/weewx/weeplot/genplot.py", line 200, in render
> Oct  8 12:52:06 TrastoRaspberry weewx[25710] ERROR weewx.reportengine:
>      ****      self._renderTopBand(draw)
> Oct  8 12:52:06 TrastoRaspberry weewx[25710] ERROR weewx.reportengine:
>      ****    File "/usr/share/weewx/weeplot/genplot.py", line 404, in
> _renderTopBand
> Oct  8 12:52:06 TrastoRaspberry weewx[25710] ERROR weewx.reportengine:
>      ****      top_label = ' '.join([line.label for line in self.line_list])
> Oct  8 12:52:06 TrastoRaspberry weewx[25710] ERROR weewx.reportengine:
>      ****  UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in
> position 7: ordinal not in range(128)
> Oct  8 12:52:06 TrastoRaspberry weewx[25710] ERROR weewx.reportengine:
>      ****  Generator terminated
>
>
> Can anybody give me a hint of where can be the problem?
>
> Thanks!
>
> Daniel
>
> --
> 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].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/weewx-user/67de28de-dab7-49c4-8cb6-b21ddfc43399n%40googlegroups.com
> <https://groups.google.com/d/msgid/weewx-user/67de28de-dab7-49c4-8cb6-b21ddfc43399n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/CAPq0zEA__m-_vPJe_nhSECVXqB-y3e2GRj6Jf0ogrOQJf8uAsw%40mail.gmail.com.

Reply via email to