I'm at loss, too. My Ubuntu 20.04, with Python 2.7, renders it perfectly.

It's a long shot, but you can try upgrading Pillow. Pillow 6.2.2 was the
last version to support Python 2.7.

*sudo python2 -m pip install Pillow==6.2.2*


-tk

On Tue, Apr 6, 2021 at 10:49 AM richard maliszewski <[email protected]>
wrote:

> Python reports 2.7.17.  PIL reports 5.1.0.  Log output pretty long-winded,
> attached.
>
> --Richard
>
>
>
>
>
> On Tuesday, April 6, 2021 at 7:44:33 AM UTC-7 [email protected] wrote:
>
>> One other thing: what version of PIL are you using? You can find out by
>> running:
>>
>> *python -c "import PIL;print(PIL.__version__)"*
>>
>>
>> Let's also double check the version of Python:
>>
>> *python -V*
>>
>>
>> -tk
>>
>> On Mon, Apr 5, 2021 at 11:02 PM gjr80 <[email protected]> wrote:
>>
>>> Attached are a couple of instrumented files that should tell us what is
>>> happening. Could you rename:
>>>
>>> /usr/share/weewx/weeplot/genplot.py to
>>> /usr/share/weewx/weeplot/genplot_orig.py
>>> /usr/share/weewx/weeplot/utilities.py to
>>> /usr/share/weewx/weeplot/utilities_orig.py
>>>
>>> and then download and save the attached genplot.py and utilities.py to
>>> directory usr/share/weewx/weeplot
>>>
>>> Then restart WeeWX and let it complete at least one full report cycle.
>>> Take a copy of the log from WeeWX startup through until the first report
>>> cycle finishes and post the log here.
>>>
>>> Gary
>>>
>>> On Tuesday, 6 April 2021 at 14:47:59 UTC+10 [email protected] wrote:
>>>
>>>> Yes, /etc/weewx/skins/Seasons/font/OpenSans-Bold.ttf.  Weewx version is
>>>> 4.40, Python is 2.7.17.  This is on Ubuntu 18.04.5 LTS.
>>>>
>>>> --Richard
>>>>
>>>> On Monday, April 5, 2021 at 8:55:46 PM UTC-7 gjr80 wrote:
>>>>
>>>>> So when you say that '"font/OpenSans-Bold.ttf", which does exist',
>>>>> where exactly does it exist?
>>>>> /etc/weewx/skins/Seasons/font/OpenSans-Bold.ttf? OpenSans-Bold.ttf is more
>>>>> than adequate, my install is using it and rendering µg/m³ just fine. The
>>>>> symptoms sounds very much like PIL is giving you a default font every 
>>>>> time.
>>>>> What version of WeeWx are you using and under which version of python is 
>>>>> it
>>>>> running(will be in the log on WeeWX startup)?
>>>>>
>>>>> Gary
>>>>>
>>>>> On Tuesday, 6 April 2021 at 10:00:06 UTC+10 [email protected] wrote:
>>>>>
>>>>>> Dug through that.  The font referenced for unit_label_font_path in
>>>>>> skin.conf for Seasons is "font/OpenSans-Bold.ttf", which does exist.
>>>>>> Thinking it might not have full support for the Unicode math symbols, I
>>>>>> changed that to "/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf", which
>>>>>> supposedly covers all 256 symbols.  And I still have the weird unit
>>>>>> label...nothing there changed.  I see no error messages WRT rendering in
>>>>>> the log as described in the User's Guide.
>>>>>>
>>>>>> What's quite odd is that the rendered text contains both the "micro"
>>>>>> and the "cubed" symbols...it just has the extra garbage as well.
>>>>>>
>>>>>> And I found where this unit value gets defined:  in
>>>>>> /usr/share/weewx/unit.py: "microgram_per_meter_cubed": u"µg/m³".  In the
>>>>>> HTML for the "current" line, this looks reasonable:  "&#181;g/m&#179;".
>>>>>> But I have yet to make the image generator happy.
>>>>>>
>>>>>> --Richard
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Monday, April 5, 2021 at 2:39:06 PM UTC-7 gjr80 wrote:
>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> Nothing to do with drivers or extensions, it’s a font issue. Have a
>>>>>>> read of the section Funky symbols in plots
>>>>>>> <http://weewx.com/docs/usersguide.htm#funky_symbols> in the User’s
>>>>>>> Guide.
>>>>>>>
>>>>>>> Gary
>>>>>>> On Tuesday, 6 April 2021 at 07:31:17 UTC+10 [email protected]
>>>>>>> wrote:
>>>>>>>
>>>>>>>> This is a minor annoyance, but I am failing to figure out where
>>>>>>>> this is being done, or how to fix it.  Units for PM2.5 are micrograms 
>>>>>>>> per
>>>>>>>> meter cubed.  I've got a "current" where the units look as expected:
>>>>>>>> µg/m³.
>>>>>>>>
>>>>>>>> But in the generated history images, the units in the upper show as
>>>>>>>> shown in this image: [image: Screen Shot 2021-04-05 at 2.27.13
>>>>>>>> PM.png]
>>>>>>>> Station data is coming from the WX1000 extension and in this case,
>>>>>>>> some of it from the PurpleAir extension.  Looking through both 
>>>>>>>> extensions,
>>>>>>>> I am not seeing who/what is choosing the unit string for these values, 
>>>>>>>> nor
>>>>>>>> where it's getting sucked into the image generator.  Hints?  I am a 
>>>>>>>> week
>>>>>>>> into using WeeWX, and am quite impressed, but finding where the bodies 
>>>>>>>> are
>>>>>>>> buried for this sort of magic.
>>>>>>>>
>>>>>>>> --Richard
>>>>>>>>
>>>>>>>> --
>>> 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/d9e7b7d1-bbf1-470b-97fe-d3a6ffbfd651n%40googlegroups.com
>>> <https://groups.google.com/d/msgid/weewx-user/d9e7b7d1-bbf1-470b-97fe-d3a6ffbfd651n%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/fa487133-f08f-4f8c-bec2-84d71537d51an%40googlegroups.com
> <https://groups.google.com/d/msgid/weewx-user/fa487133-f08f-4f8c-bec2-84d71537d51an%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/CAPq0zEDvYiGF2cnBvTHDB%2BR2sBaHS_8Wy8apSd41qmXe%2BnHZ1Q%40mail.gmail.com.

Reply via email to