Corrupted diagram images generated after update

127 views
Skip to first unread message

Stephan M.

unread,
Aug 2, 2020, 4:03:11 PM8/2/20
to weewx-user
Hi, I am using a Oregon Scientific WMR88 (WMR100 driver) and the Seasons skin which is properly running except that it is generating corrupted diagram images.
Trying to open the images (i.e. daybarometer.png) directly with an image viewer shows an error 'bad adaptive filter value'.
With gimp I am able to open it:

daybarometer.jpg


The issue appears after updating debian from stretch -> buster and from weewx 3.9 to 4.1.1. Maybe an issue with the also updated python-pillow package.
Logging shows nothing unusual.

System
debian buster on armel (all installed via .deb package, no pip3 installed)
weewx 4.1.1
python 3.7.3
python3-pil 5.4.1

journalctl -xe with debug=2
Aug 02 21:48:00 weewx python3[2497]: wee_reports[2497] DEBUG weewx.manager: Daily summary version is 2.0
Aug 02 21:48:16 weewx python3[2497]: wee_reports[2497] INFO weewx.cheetahgenerator: Generated 8 files for report SeasonsReport in 16.10 seconds
Aug 02 21:48:17 weewx python3[2497]: wee_reports[2497] DEBUG weewx.manager: Daily summary version is 2.0
Aug 02 21:48:22 weewx python3[2497]: wee_reports[2497] INFO weewx.imagegenerator: Generated 15 images for report SeasonsReport in 5.50 seconds
Aug 02 21:48:22 weewx python3[2497]: wee_reports[2497] INFO weewx.reportengine: Copied 5 files to /var/www/html/weewx
Aug 02 21:48:22 weewx python3[2497]: wee_reports[2497] DEBUG weewx.reportengine: Running report 'SmartphoneReport'
Aug 02 21:48:23 weewx python3[2497]: wee_reports[2497] DEBUG weewx.reportengine: Found configuration file /etc/weewx/skins/Smartphone/skin.conf for report 'SmartphoneReport'
Aug 02 21:48:23 weewx python3[2497]: wee_reports[2497] DEBUG weewx.cheetahgenerator: Using search list ['weewx.cheetahgenerator.Almanac', 'weewx.cheetahgenerator.Station', 'weewx.cheetahgenerator.Cu
Aug 02 21:48:23 weewx python3[2497]: wee_reports[2497] DEBUG weewx.manager: Daily summary version is 2.0
Aug 02 21:48:23 weewx python3[2492]: weewx[2492] DEBUG weewx.drivers.wmr100: Bad USB report received: [Errno 110] Operation timed out
Aug 02 21:48:24 weewx python3[2497]: wee_reports[2497] INFO weewx.cheetahgenerator: Generated 6 files for report SmartphoneReport in 1.25 seconds
Aug 02 21:48:24 weewx python3[2497]: wee_reports[2497] DEBUG weewx.manager: Daily summary version is 2.0
Aug 02 21:48:25 weewx python3[2497]: wee_reports[2497] INFO weewx.imagegenerator: Generated 6 images for report SmartphoneReport in 1.42 seconds
Aug 02 21:48:25 weewx python3[2497]: wee_reports[2497] INFO weewx.reportengine: Copied 6 files to /var/www/html/weewx/smartphone
Aug 02 21:48:26 weewx python3[2497]: wee_reports[2497] DEBUG weewx.reportengine: Report '
MobileReport' not enabled. Skipping.
Aug 02 21:48:26 weewx python3[2497]: wee_reports[2497] DEBUG weewx.reportengine: Report '
StandardReport' not enabled. Skipping.
Aug 02 21:48:26 weewx python3[2497]: wee_reports[2497] DEBUG weewx.reportengine: Report '
FTP' not enabled. Skipping.
Aug 02 21:48:26 weewx python3[2497]: wee_reports[2497] DEBUG weewx.reportengine: Running report '
RSYNC'
Aug 02 21:48:26 weewx python3[2497]: wee_reports[2497] DEBUG weewx.reportengine: Found configuration file /etc/weewx/skins/Rsync/skin.conf for report '
RSYNC'
Aug 02 21:48:26 weewx python3[2497]: wee_reports[2497] DEBUG weeutil.rsyncupload: rsyncupload: cmd: [['
rsync', '--archive', '--stats', '-e ssh -p 221', '/var/www/html/weewx/', 'embedded-engineer.de@
Aug 02 21:48:27 weewx python3[2497]: wee_reports[2497] INFO weeutil.rsyncupload: rsync'd 46 files (431,862 bytes) in 1.15 seconds
Aug 02 21:48:57 weewx python3[2492]: weewx[2492] DEBUG weewx.drivers.wmr100: Bad USB report received: [Errno 110] Operation timed out
Aug 02 21:49:19 weewx python3[2492]: weewx[2492] DEBUG weewx.drivers.wmr100: Bad USB report received: [Errno 110] Operation timed out


weewx.conf
    [[SeasonsReport]]
       
# The SeasonsReport uses the 'Seasons' skin, which contains the
       
# images, templates and plots for the report.
        skin
= Seasons
        enable
= true
        HTML_ROOT
= /var/www/html/weewx

skins/Seasons/skin.conf is attached

Any help is appreciated
Thanks
Stephan
skin.conf
weewx.conf
daybarometer.png

Tom Keffer

unread,
Aug 2, 2020, 4:38:11 PM8/2/20
to weewx-user
This is a new one for me.

I agree that it's most likely an issue with pillow or, possibly, an underlying C library. Does it do this with every image, every time? Or, just an occasional image?

Try uninstalling Pillow, then reinstall.



--
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/473c2e3b-0e7a-45bb-aa54-11b32a5bf6a1o%40googlegroups.com.

Stephan M.

unread,
Aug 3, 2020, 11:19:37 AM8/3/20
to weewx-user
Hi Tom, thanks for reply.
The webpage showing the faulty diagrams is here.

This happens to every image generated. Also the old standard skin show same behaviour.
But I tried Belchertown and there isn't such an issue.

A reinstallation of weewx and all python3 packages didn't solve the problem.

A solution could be to use the Belchertown skin, but the machine running weewx hasn't that much performance and a report takes a longer time and maintenance is very slow.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx...@googlegroups.com.

Tom Keffer

unread,
Aug 3, 2020, 4:27:07 PM8/3/20
to weewx-user
Try turning off the anti-aliasing.

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/98465426-96f1-466b-b12e-c4260aeeaf83o%40googlegroups.com.

Stephan M.

unread,
Aug 4, 2020, 2:18:51 PM8/4/20
to weewx-user
I tried following:
anti_alias = 0
after systemctl restart weewx.service and wee_reports gives
 File "/usr/share/weewx/weeplot/genplot.py", line 217, in render
    image
.thumbnail((self.image_width / self.anti_alias, self.image_height / self.anti_alias), Image.ANTIALIAS)
ZeroDivisionError: division by zero
commenting line anti_alias or set it to any value except 0 (tried up to 6) doesn't help.

Next step
I also backuped database + config files and purged weewx and python3 completly. After reinstall same issue appears.

Last step, but successful
I added debian oldstable to the apt sources and installed python-pil 4.0.0 instead of 5.4.1, and now diagrams are generated.
https://www.embedded-engineer.de/weewx/
How may I help you to find this bug which obviously doesn't concern anyone else ?

Thanks
Stephan

Tom Keffer

unread,
Aug 4, 2020, 2:28:07 PM8/4/20
to weewx-user
You turn off aliasing by giving it a value of 1 (which is the default)

anti_alias = 1

-tk

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/67a24929-dc97-417a-a76e-4669e9186e52o%40googlegroups.com.

Stephan M.

unread,
Aug 4, 2020, 4:25:12 PM8/4/20
to weewx-user
Yes I tried that, but no success.
I also noticed, that only the combination of python-pil 4.0.0 and python2 will work.

thanks
Stephan

Tom Keffer

unread,
Aug 4, 2020, 5:14:29 PM8/4/20
to weewx-user
Just checked your webpage. It looks like the images are displaying correctly now. What did you change?

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/542a5dc2-4c67-4532-a97a-df8904888272o%40googlegroups.com.

Greg from Oz

unread,
Aug 4, 2020, 6:56:46 PM8/4/20
to weewx-user
I looked at the web page and they looked wrong but then I did a web page reload and they look correct.
Maybe it was working but needs a page reload?

Stephan M.

unread,
Aug 5, 2020, 3:02:02 PM8/5/20
to weewx-user
@Tom: As described in post before I downgraded to python-pil 4.0.0 (debian oldstable) and used python2. This combination works for me.
@Greg: Yes, that behaviour starts from the beginning of using the webhost where pages are uploaded. I don't mind but it must be a setting for apache on the webserver. Nevertheless, weewx is rsyncing the whole page correctly.
Reply all
Reply to author
Forward
0 new messages