Hello,
I have just installed weewx as described
here: https://weisser-zwerg.dev/posts/ecowitt-gw2000-weewx-docker
And I run into an error that prevents the images from being drawn:
weewx-weewx-1 | Apr 3 13:11:03 weewx[20] ERROR weewx.reportengine:
**** Generator terminated
weewx-weewx-1 | Traceback (most recent call last):
weewx-weewx-1 | File "/home/weewx/bin/weewx/reportengine.py", line
197, in run
weewx-weewx-1 | obj.start()
weewx-weewx-1 | File "/home/weewx/bin/weewx/reportengine.py", line
385, in start
weewx-weewx-1 | self.run()
weewx-weewx-1 | File "/home/weewx/bin/weewx/imagegenerator.py", line
42, in run
weewx-weewx-1 | self.gen_images(self.gen_ts)
weewx-weewx-1 | File "/home/weewx/bin/weewx/imagegenerator.py", line
114, in gen_images
weewx-weewx-1 | image = plot.render()
weewx-weewx-1 | ^^^^^^^^^^^^^
weewx-weewx-1 | File "/home/weewx/bin/weeplot/genplot.py", line 222,
in render
weewx-weewx-1 | self._renderDayNight(sdraw)
weewx-weewx-1 | File "/home/weewx/bin/weeplot/genplot.py", line 266,
in _renderDayNight
weewx-weewx-1 | sdraw.rectangle(((xleft,self.yscale[0]),
weewx-weewx-1 | File "/home/weewx/bin/weeplot/utilities.py", line
442, in rectangle
weewx-weewx-1 | self.draw.rectangle(box_scaled, **options)
weewx-weewx-1 | File
"/opt/venv/lib/python3.11/site-packages/PIL/ImageDraw.py", line 294, in
rectangle
weewx-weewx-1 | self.draw.draw_rectangle(xy, fill, 1)
weewx-weewx-1 | ValueError: y1 must be greater than or equal to y0
I have followed the complete set-up process as described in "WeeWX:
Installation using setup.py", except that I do use a conda environment and
pip packages rather than the OS packages:
> mamba create -n weewx python=3.9
> conda activate weewx
> pip3 install configobj paho-mqtt pyserial pyusb Cheetah3 Pillow ephem
> wget https://weewx.com/downloads/weewx-4.10.2.tar.gz
> tar -xzvf weewx-4.10.2.tar.gz
> cd weewx-4.10.2
> python3 ./setup.py build
> python3 ./setup.py install
> # create the weewx.conf.patch from here:
https://weisser-zwerg.dev/posts/ecowitt-gw2000-weewx-docker/
> patch -p1 weewx.conf < weewx.conf.patch
> wget -O weewx-mqtt.zip
https://github.com/matthewwall/weewx-mqtt/archive/master.zip
> ./bin/wee_extension --install ./weewx-mqtt.zip
> wget -O weewx-interceptor.zip
https://github.com/matthewwall/weewx-interceptor/archive/master.zip
> ./bin/wee_extension --install ./weewx-interceptor.zip
> # -------------------
> ./bin/weewxd
I still run into the exact same problem. I've tried several modifications
to the config file, but cannot figure out what causes this problem. I've
also added some print statement to tell me more about the issue around the
drawing of the rectangle:
def rectangle(self, box, **options):
"""Draw a scaled rectangle.
box: A pair of 2-way tuples, containing coordinates of opposing corners
of the box.
options: passed on to draw.rectangle. Usually contains 'fill' (the color)
"""
box_scaled = [(coord[0] * self.xscale + self.xoffset + 0.5,
coord[1] * self.yscale + self.yoffset + 0.5) for coord in box]
try:
self.draw.rectangle(box_scaled, **options)
print("Draw rectangle succeeded.")
except:
print("Draw rectangle failed:")
print(box)
print(box_scaled)
print(f"self.xscale: {self.xscale}, self.xoffset: {self.xoffset},
self.yscale: {self.yscale}, self.yoffset: {self.yoffset}\n")
pass
And I get results as follows:
# ((1680429600, 1029.6000000000001), (1680457455, 1030.1000000000001))
# [(44.01851851865649, 144.4999999999709), (216.61388888955116,
24.499999999970896)]
# self.xscale: 0.004465020576131688, self.xoffset: -7503109, self.yscale:
-240.0, self.yoffset: 247248
Do you have any clues on how to resolve this?
Thanks!
--
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/cf100b38-68c2-47de-ae9d-0b1d91a2da96n%40googlegroups.com.