Can´t install PrintJobHistory

Hi,

I reloaded Raspbian Buster Lite and installed Klipper and OctoPrint via KIAUH. I can't get PrintJobHistory installed. The installation is successful via the plugin manager, but after a restart I get the following errors:

2021-05-18 17:05:58,537 - octoprint.plugin.core - ERROR - Error loading plugin PrintJobHistory
Traceback (most recent call last):
  File "/home/pi/OctoPrint/venv/lib/python3.7/site-packages/octoprint/plugin/core.py", line 1264, in _import_plugin
    module = _load_module(module_name, spec)
  File "/home/pi/OctoPrint/venv/lib/python3.7/site-packages/octoprint/plugin/core.py", line 69, in _load_module
    return imp.load_module(name, f, filename, details)
  File "/home/pi/OctoPrint/venv/lib/python3.7/site-packages/octoprint/vendor/imp.py", line 238, in load_module
    return load_package(name, filename)
  File "/home/pi/OctoPrint/venv/lib/python3.7/site-packages/octoprint/vendor/imp.py", line 212, in load_package
    return _load(spec)
  File "<frozen importlib._bootstrap>", line 696, in _load
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/pi/OctoPrint/venv/lib/python3.7/site-packages/octoprint_PrintJobHistory/__init__.py", line 26, in <module>
    from .api.PrintJobHistoryAPI import PrintJobHistoryAPI
  File "/home/pi/OctoPrint/venv/lib/python3.7/site-packages/octoprint_PrintJobHistory/api/PrintJobHistoryAPI.py", line 23, in <module>
    from octoprint_PrintJobHistory.api import TransformPrintJob2JSON, TransformSlicerSettings2JSON
  File "/home/pi/OctoPrint/venv/lib/python3.7/site-packages/octoprint_PrintJobHistory/api/TransformPrintJob2JSON.py", line 4, in <module>
    from octoprint_PrintJobHistory.CameraManager import CameraManager
  File "/home/pi/OctoPrint/venv/lib/python3.7/site-packages/octoprint_PrintJobHistory/CameraManager.py", line 9, in <module>
    from PIL import Image
  File "/home/pi/OctoPrint/venv/lib/python3.7/site-packages/PIL/Image.py", line 109, in <module>
    from . import _imaging as core
ImportError: libopenjp2.so.7: cannot open shared object file: No such file or directory

When I try to install the plugin via the console I get the following errors:


pi@raspberrypi:~ $ pip install "https://github.com/OllisGit/OctoPrint-PrintJobHistory/releases/latest/download/master.zip"
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting https://github.com/OllisGit/OctoPrint-PrintJobHistory/releases/latest/download/master.zip
  Downloading https://github.com/OllisGit/OctoPrint-PrintJobHistory/releases/latest/download/master.zip (7.4MB)
    100% |████████████████████████████████| 7.4MB 33kB/s
    Complete output from command python setup.py egg_info:
    Could not import OctoPrint's setuptools, are you sure you are running that under the same python installation that OctoPrint is installed under?

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 255 in /tmp/pip-req-build-LoRyD3/

Via console I had the same problem with the "Bed Visualizer" plugin, but at some point it started the plugin.

Log:
octoprint (8).log (15.7 KB)

Hope someone can help me with the problem.

Many Thanks

BR
André

There is an issue with the used image library called pillow.

Take a look on this: python - Pillow: libopenjp2.so.7: cannot open shared object file: No such file or directory - Stack Overflow

Or Octolapse is also using this dependency and he created a troubleshot-guide, maybe that helps: V0.4 Troubleshooting Installation Issues · FormerLurker/Octolapse Wiki · GitHub