broken graphs - traceback

57 views
Skip to first unread message

Greg Troxel

unread,
Jul 26, 2023, 8:19:36 AM7/26/23
to weewx...@googlegroups.com
My system was working for a very long time, and I recently upgraded
system packages, and now it has an issue

RPI 3B
NetBSD 9 (earmv7hf-el, so running armv7/32-bit)
python 3.10
Davis VP2 serial
traditional skin, with traditional graphs

My weewx code is (I track git):

there used to be a hash here, but I wonder if that's not allowed
Author: Tom Keffer <tke...@gmail.com>
Date: Sun Dec 25 10:32:16 2022 -0800

Fix problem where grace is still used.

and yes I know I should update.

After my package update (new micro of python, etc.) I have Pillow
9.5.0. Among others, I have:

py310-paho-mqtt-1.6.1nb1
py310-usb-1.2.1
py310-serial-3.5nb2
py310-ephem-3.7.7.1nb1
py310-configobj-5.0.8
py310-cheetah-3.2.6nb2
python310-3.10.12
py310-ecdsa-0.18.0
py310-olefile-0.46nb1
openjpeg-2.5.0nb1
libwebp-1.2.4nb1
lcms2-2.14nb1
py310-six-1.16.0nb1
py310-Pillow-9.5.0nb3
py310-weewx-4.9.1


Now, graphs are not generated, but everything else is ok. MQTT reports
are fine.

Running wee_reports manually, I get this twice, which I interpret as
once for my normal skin and once for metric. It seems not to continue
trying to generate the rest of the graphs after traceback.

$ bin/wee_reports
Generating as of last timestamp in the database.
Using configuration file /usr/weewx/weewx.conf
Traceback (most recent call last):
File "/usr/weewx/bin/weewx/reportengine.py", line 197, in run
obj.start()
File "/usr/weewx/bin/weewx/reportengine.py", line 385, in start
self.run()
File "/usr/weewx/bin/weewx/imagegenerator.py", line 42, in run
self.gen_images(self.gen_ts)
File "/usr/weewx/bin/weewx/imagegenerator.py", line 114, in gen_images
image = plot.render()
File "/usr/weewx/bin/weeplot/genplot.py", line 222, in render
self._renderDayNight(sdraw)
File "/usr/weewx/bin/weeplot/genplot.py", line 266, in _renderDayNight
sdraw.rectangle(((xleft,self.yscale[0]),
File "/usr/weewx/bin/weeplot/utilities.py", line 442, in rectangle
self.draw.rectangle(box_scaled, **options)
File "/usr/pkg/lib/python3.10/site-packages/PIL/ImageDraw.py", line 294, in rectangle
self.draw.draw_rectangle(xy, fill, 1)
ValueError: y1 must be greater than or equal to y0

I don't see anything that jumps out in git history, but will update. I
am curious if

anyone else has seen this
suspects this is a pillow bug
suspects my database is messed up
suspects something else.

p q

unread,
Jul 26, 2023, 8:42:52 AM7/26/23
to weewx...@googlegroups.com
I don't have time right this minute to dig in further, but I recall a conversation here with the same error - google finds https://groups.google.com/g/weewx-user/c/R7bHDrZ0PRE 

Maybe this is a clue for you.

--
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/rmitttq50h7.fsf%40s1.lexort.com.


--
Peter Quinn
(415)794-2264

Greg Troxel

unread,
Jul 26, 2023, 9:38:39 AM7/26/23
to p q, weewx...@googlegroups.com
p q <peterq...@gmail.com> writes:

> I don't have time right this minute to dig in further, but I recall a
> conversation here with the same error - google finds
> https://groups.google.com/g/weewx-user/c/R7bHDrZ0PRE

Thanks very much; that is a huge hint.

Turning off daynight got me 4 plots.

Copying weeplot/utilities.py and regenerating got me all plots.
Reenabling daynight it is still ok.


So for anybody else reading, if you see this

> File "/usr/pkg/lib/python3.10/site-packages/PIL/ImageDraw.py", line
> 294, in rectangle
> self.draw.draw_rectangle(xy, fill, 1)
> ValueError: y1 must be greater than or equal to y0

update to new weewx, or back off Pillow to 9.4.0.

Reply all
Reply to author
Forward
0 new messages