mendhak / waveshare-epaper-display

At-a-glance dashboard for Raspberry Pi with a Waveshare ePaper 7.5 Inch HAT. Date/Time, Weather, Alerts, Google/Outlook Calendar
https://code.mendhak.com/raspberrypi-epaper-dashboard/
438 stars 65 forks source link

Bug when installing with bullseye image #53

Closed hnnweb closed 1 year ago

hnnweb commented 1 year ago
EXPORT TO PNG
---------------------------------------
Traceback (most recent call last):
  File "/usr/local/bin/cairosvg", line 5, in <module>
    from cairosvg.__main__ import main
  File "/usr/local/lib/python3.9/dist-packages/cairosvg/__init__.py", line 26, in <module>
    from . import surface  # noqa isort:skip
  File "/usr/local/lib/python3.9/dist-packages/cairosvg/surface.py", line 19, in <module>
    from .image import image, invert_image
  File "/usr/local/lib/python3.9/dist-packages/cairosvg/image.py", line 9, in <module>
    from PIL import Image, ImageOps
  File "/usr/local/lib/python3.9/dist-packages/PIL/Image.py", line 100, in <module>
    from . import _imaging as core
ImportError: libopenjp2.so.7: cannot open shared object file: No such file or directory
---------------------------------------
DISPLAY ON EPAPER
---------------------------------------
Traceback (most recent call last):
  File "/home/gru/waveshare-epaper-display/display.py", line 6, in <module>
    from PIL import Image
  File "/usr/local/lib/python3.9/dist-packages/PIL/Image.py", line 100, in <module>
    from . import _imaging as core
ImportError: libopenjp2.so.7: cannot open shared object file: No such file or directory

The solution is to install the following package: sudo apt-get install libopenjp2-7

mendhak commented 1 year ago

I'm still testing the localization, I need to reformat my Pi anyway. I'll combine that with testing this and add the package to the instructions

mendhak commented 1 year ago

I've just done a fresh reinstall. A change I've made now is to do the setup in a Python virtual environment, to reduce problems with the rest of the OS. I've not seen a problem so far so I'm adding it to the README.

mendhak commented 1 year ago

I've done two fresh installs, with the new instructions, without problems, so I think this is solved now. I'll close it but can reopen if it happens again.

hnnweb commented 1 year ago

Hi, this error still occurs.


DISPLAY ON EPAPER
---------------------------------------
Traceback (most recent call last):
  File "/home/hnn/waveshare-epaper-display/display.py", line 6, in <module>
    from PIL import Image
  File "/home/hnn/waveshare-epaper-display/.venv/lib/python3.9/site-packages/PIL/Image.py", line 100, in <module>
    from . import _imaging as core
ImportError: libopenjp2.so.7: cannot open shared object file: No such file or directory```

Fresh install on RPi Zero W rev 1.1
mendhak commented 1 year ago

Hmm I did 5 fresh installs over the past few weeks but didn't have to add that, are we using the same image? I used the Raspberry Pi OS Imager

image

Well I guess no harm if I add the libopenjp2-7 package to the instructions, but I don't know why.

mendhak commented 1 year ago

I've added it