4.0.0b16 - No diagrams - No module named 'Image'

199 views
Skip to first unread message

Michael

unread,
Mar 22, 2020, 10:01:34 AM3/22/20
to weewx-user

Hello,

i'm trying to get a weewx 4.0.0b16 running in conjunction with python3 installation.

Unfortunately no diagrams are drawn in Skin Seasons.

Enclosed is an extract from the log. I guess I made a mistake during the installation or forgot something. Only what...?

 

 

 

Mar 22 14:46:24 raspi02 weewx[19089] DEBUG user.sdr: packet={'extraTemp1': 17.1, 'extraHumid1': 54.0, 'dateTime': 1584884781, 'usUnits': 16}

Mar 22 14:46:25 raspi02 weewx[19089] INFO weewx.manager: Added record 2020-03-22 14:45:00 CET (1584884700) to database 'weewx_sdr2'

Mar 22 14:46:25 raspi02 weewx[19089] INFO weewx.manager: Added record 2020-03-22 14:45:00 CET (1584884700) to daily summary in 'weewx_sdr2'

Mar 22 14:46:25 raspi02 weewx[19089] DEBUG weewx.reportengine: Running reports for latest time in the database.

Mar 22 14:46:25 raspi02 weewx[19089] DEBUG weewx.reportengine: Running report 'SeasonsReport'

Mar 22 14:46:25 raspi02 weewx[19089] DEBUG weewx.reportengine: Found configuration file /home/weewx/skins/Seasons/skin.conf for report 'SeasonsReport'

Mar 22 14:46:25 raspi02 weewx[19089] DEBUG weewx.cheetahgenerator: Using search list ['weewx.cheetahgenerator.Almanac', 'weewx.cheetahgenerator.Station', 'weewx.cheetahgenerator.Current', 'weewx.cheetahgenerator.Stats', 'weewx.cheetahgenerator.UnitInfo', 'weewx.cheetahgenerator.Extras']

Mar 22 14:46:25 raspi02 weewx[19089] DEBUG weewx.manager: Daily summary version is 2.0

Mar 22 14:46:27 raspi02 weewx[19089] INFO weewx.cheetahgenerator: Generated 8 files for report SeasonsReport in 2.21 seconds

Mar 22 14:46:27 raspi02 weewx[19089] ERROR weewx.reportengine: Unable to instantiate generator 'weewx.imagegenerator.ImageGenerator'

Mar 22 14:46:27 raspi02 weewx[19089] ERROR weewx.reportengine:         ****  No module named 'Image'

Mar 22 14:46:27 raspi02 weewx[19089] ERROR weewx.reportengine:         ****  Traceback (most recent call last):

Mar 22 14:46:27 raspi02 weewx[19089] ERROR weewx.reportengine:         ****    File "/home/weewx/bin/weeplot/genplot.py", line 15, in <module>

Mar 22 14:46:27 raspi02 weewx[19089] ERROR weewx.reportengine:         ****      from PIL import Image, ImageDraw

Mar 22 14:46:27 raspi02 weewx[19089] ERROR weewx.reportengine:         ****    File "/usr/local/lib/python3.7/dist-packages/PIL/Image.py", line 69, in <module>   Mar 22 14:46:27 raspi02 weewx[19089] ERROR weewx.reportengine:         ****      from . import _imaging as core

Mar 22 14:46:27 raspi02 weewx[19089] ERROR weewx.reportengine:         ****  ImportError: libopenjp2.so.7: Kann die Shared-Object-Datei nicht öffnen: Datei oder Verzeichnis nicht gefunden

Mar 22 14:46:27 raspi02 weewx[19089] ERROR weewx.reportengine:         ****

Mar 22 14:46:27 raspi02 weewx[19089] ERROR weewx.reportengine:         ****  During handling of the above exception, another exception occurred:

Mar 22 14:46:27 raspi02 weewx[19089] ERROR weewx.reportengine:         ****

Mar 22 14:46:27 raspi02 weewx[19089] ERROR weewx.reportengine:         ****  Traceback (most recent call last):

Mar 22 14:46:27 raspi02 weewx[19089] ERROR weewx.reportengine:         ****    File "/home/weewx/bin/weewx/reportengine.py", line 180, in run

Mar 22 14:46:27 raspi02 weewx[19089] ERROR weewx.reportengine:         ****      obj = weeutil.weeutil.get_object(generator)(

Mar 22 14:46:27 raspi02 weewx[19089] ERROR weewx.reportengine:         ****    File "/home/weewx/bin/weeutil/weeutil.py", line 1093, in get_object

Mar 22 14:46:27 raspi02 weewx[19089] ERROR weewx.reportengine:         ****      mod = __import__(module)

Mar 22 14:46:27 raspi02 weewx[19089] ERROR weewx.reportengine:         ****    File "/home/weewx/bin/weewx/imagegenerator.py", line 19, in <module>

Mar 22 14:46:27 raspi02 weewx[19089] ERROR weewx.reportengine:         ****      import weeplot.genplot

Mar 22 14:46:27 raspi02 weewx[19089] ERROR weewx.reportengine:         ****    File "/home/weewx/bin/weeplot/genplot.py", line 17, in <module>

Mar 22 14:46:27 raspi02 weewx[19089] ERROR weewx.reportengine:         ****      import Image, ImageDraw

Mar 22 14:46:27 raspi02 weewx[19089] ERROR weewx.reportengine:         ****  ModuleNotFoundError: No module named 'Image'

Mar 22 14:46:27 raspi02 weewx[19089] ERROR weewx.reportengine:         ****  Generator ignored

Mar 22 14:46:27 raspi02 weewx[19089] INFO weewx.reportengine: Copied 0 files to /var/www/html/weewx-sdr2

Mar 22 14:46:27 raspi02 weewx[19089] DEBUG weewx.reportengine: Report 'SmartphoneReport' not enabled. Skipping.

Mar 22 14:46:27 raspi02 weewx[19089] DEBUG weewx.reportengine: Report 'MobileReport' not enabled. Skipping.

Mar 22 14:46:27 raspi02 weewx[19089] DEBUG weewx.reportengine: Report 'StandardReport' not enabled. Skipping.

Mar 22 14:46:27 raspi02 weewx[19089] DEBUG weewx.reportengine: Report 'FTP' not enabled. Skipping.

Mar 22 14:46:27 raspi02 weewx[19089] DEBUG weewx.reportengine: Report 'RSYNC' not enabled. Skipping.

Mar 22 14:46:28 raspi02 weewx[19089] DEBUG user.sdr: lines=['{"time" : "2020-03-22 13:46:24", "model" : "Hideki-TS04", "id" : 12, "channel" : 3, "battery_ok" : 1, "temperature_C" : 5.700, "humidity" : 56, "mic" : "CRC"}\n', '{"time" : "2020-03-22 13:46:24", "model" : "Hideki-TS04", "id" : 12, "channel" : 3, "battery_ok" : 1, "temperature_C" : 5.700, "humidity" : 56, "mic" : "CRC"}\n', '{"time" : "2020-03-22 13:46:25", "model" : "Hideki-TS04", "id" : 12, "channel" : 3, "battery_ok" : 1, "temperature_C" : 5.700, "humidity" : 56, "mic" : "CRC"}\n']


Michael

 

Thomas Keffer

unread,
Mar 22, 2020, 10:25:59 AM3/22/20
to weewx-user
You need to install either PIL or pillow. 

sudo apt install python3-pil

-tk

--
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/864d282f-b679-4cb6-8706-62c7fff6b3ac%40googlegroups.com.

Michael

unread,
Mar 22, 2020, 12:02:08 PM3/22/20
to weewx-user
python3-pil was already installed

pi@raspi02:~ $ sudo apt install python3-pil
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut.
Statusinformationen werden eingelesen.... Fertig
python3-pil ist schon die neueste Version (5.4.1-2+deb10u1).
0 aktualisiert, 0 neu installiert, 0 zu entfernen und 4 nicht aktualisiert.

Thomas Keffer

unread,
Mar 22, 2020, 7:57:00 PM3/22/20
to weewx-user
Let's make sure python-pil installed where the interpreter can find it. One of these two should work.

python3 -c "import Image"
python3 -c "from PIL import Image"

If neither works, and you're sure you installed python3-pil, then python3 is searching in some non-standard place. Here is where it's searching:

python3 -c "import sys; print(sys.path)"

-tk

--
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.

Michael

unread,
Mar 23, 2020, 11:09:09 AM3/23/20
to weewx-user
here it is...:

pi@raspi02:~ $ python3 -c "import Image"

Traceback (most recent call last):
File "<string>", line 1, in <module>

ModuleNotFoundError: No module named 'Image'
pi@raspi02:~ $ python3 -c "from PIL import Image"

Traceback (most recent call last):
File "<string>", line 1, in <module>

File "/usr/local/lib/python3.7/dist-packages/PIL/Image.py", line 69, in <module>
from . import _imaging as core
ImportError: libopenjp2.so.7: cannot open shared object file: No such file or directory
pi@raspi02:~ $ python3 -c "import sys; print(sys.path)"
['', '/usr/lib/python37.zip', '/usr/lib/python3.7', '/usr/lib/python3.7/lib-dynload', '/usr/local/lib/python3.7/dist-packages', '/usr/lib/python3/dist-packages
']

with this result google fed.
and then installed libopenjp2-7.
And the diagrams are displayed.
Thanks for the support.

Thomas Keffer

unread,
Mar 23, 2020, 11:56:28 AM3/23/20
to weewx-user
Hmm, I wonder where the dependency on libopenjp2 came from? Could you run these commands?

apt list python3-pil
apt show python3-pil
cat /etc/issue

--
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.

Michael

unread,
Mar 23, 2020, 12:35:59 PM3/23/20
to weewx-user
apt list python3-pil

pi@raspi02:~ $ apt list python3-pil
Auflistung... Fertig
python3-pil/stable,now 5.4.1-2+deb10u1 armhf  [installiert]


apt show python3-pil

pi@raspi02:~ $ apt show python3-pil
Package: python3-pil
Version: 5.4.1-2+deb10u1
Priority: optional
Section: python
Source: pillow
Maintainer: Matthias Klose <do...@debian.org>
Installed-Size: 1.348 kB
Provides: python3-pillow
Depends: python3 (<< 3.8), python3 (>= 3.7~), python3:any, mime-support | python3-pil.imagetk, libc6 (>= 2.11), libfreetype6 (>= 2.2.1), libimagequant0 (>= 2.1
1.10), libjpeg62-turbo (>= 1.3.1), liblcms2-2 (>= 2.2+git20110628), libtiff5 (>= 4.0.3), libwebp6 (>= 0.5.1), libwebpdemux2 (>= 0.5.1), libwebpmux3 (>= 0.6.1-2
), zlib1g (>= 1:1.1.4)
Recommends: python3-olefile
Suggests: python-pil-doc, python3-pil-dbg
Conflicts: python3-imaging (<< 1.1.7+2.0.0-1.1)
Breaks: python3-imaging (<< 1.1.7+2.0.0-1.1)
Replaces: python3-imaging (<< 1.1.7+2.0.0-1.1)
Homepage: http://python-pillow.github.io/
Download-Size: 364 kB
APT-Manual-Installed: yes
APT-Sources: http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages
Description: Python Imaging Library (Python3)
 The Python Imaging Library (PIL) adds an image object to your Python
 interpreter. You can load images from a variety of file formats, and
 apply a rich set of image operations to them.
 .
 Image Objects:
  o Bilevel, greyscale, palette, true colour (RGB), true colour with
    transparency (RGBA).
  o colour separation (CMYK).
  o Copy, cut, paste operations.
  o Flip, transpose, resize, rotate, and arbitrary affine transforms.
  o Transparency operations.
  o Channel and point operations.
  o Colour transforms, including matrix operations.
  o Image enhancement, including convolution filters.
 .
 File Formats:
  o Full (Open/Load/Save): BMP, EPS (with ghostscript), GIF, IM, JPEG,
    MSP, PDF, PNG, PPM, TIFF, XBM.
  o Read only (Open/Load): ARG, CUR, DCX, FLI, FPX, GBR, GD, ICO, IMT, IPTC,
    MCIDAS, MPEG, PhotoCD, PCX, PIXAR, PSD, TGA, SGI, SUN, TGA, WMF, XPM.
  o Save only: PDF, EPS (without ghostscript).


cat /etc/issue

pi@raspi02:~ $ cat /etc/issue
Raspbian GNU/Linux 10 \n \l

Thomas Keffer

unread,
Mar 23, 2020, 1:04:35 PM3/23/20
to weewx-user
Nothing unusual there.

Best guess is that this is a Debian dependency bug in python-pil, that carried over into python3-pil.

Cheers,

-tk

--
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.
Reply all
Reply to author
Forward
0 new messages