jneilliii / OctoPrint-BackupScheduler

11 stars 3 forks source link

[BUG]: Version 0.2.0 fails to start on latest OctoPi/OctoPrint #27

Closed tjhorner closed 1 week ago

tjhorner commented 1 week ago

Describe the bug The 0.2.0 version of the plugin does not start on an (almost) clean install of the latest OctoPi image. It seems the addition of the cryptography requirement causes the failure. Version 0.1.0 works fine for me.

Expected behavior Should start!

Debug Log

2024-11-08 14:54:41,118 - octoprint.plugin.core - ERROR - Error loading plugin backupscheduler
Traceback (most recent call last):
  File "/home/tj/oprint/lib/python3.9/site-packages/octoprint/plugin/core.py", line 1297, in _import_plugin
    module = _load_module(module_name, spec)
  File "/home/tj/oprint/lib/python3.9/site-packages/octoprint/plugin/core.py", line 52, in _load_module
    return imp.load_module(name, f, filename, details)
  File "/home/tj/oprint/lib/python3.9/site-packages/octoprint/vendor/imp.py", line 238, in load_module
    return load_package(name, filename)
  File "/home/tj/oprint/lib/python3.9/site-packages/octoprint/vendor/imp.py", line 212, in load_package
    return _load(spec)
  File "<frozen importlib._bootstrap>", line 711, in _load
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 790, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/home/tj/oprint/lib/python3.9/site-packages/octoprint_backupscheduler/__init__.py", line 14, in <module>
    from cryptography.fernet import Fernet
  File "/home/tj/oprint/lib/python3.9/site-packages/cryptography/fernet.py", line 14, in <module>
    from cryptography.exceptions import InvalidSignature
  File "/home/tj/oprint/lib/python3.9/site-packages/cryptography/exceptions.py", line 9, in <module>
    from cryptography.hazmat.bindings._rust import exceptions as rust_exceptions
ImportError: libssl.so.3: cannot open shared object file: No such file or directory

Screenshots n/a

Firmware and Version

jneilliii commented 1 week ago

Think I may need to pin that cryptography version. If you SSH to the pi and run the following command does it resolve the issue?

~/oprint/bin/pip install --force-reinstall cryptography<43.0.0
jneilliii commented 1 week ago

Or potentially installing updated libssl at the system level.

sudo apt install libssl3
jneilliii commented 1 week ago

I've just released version 0.2.1 that is using a pinned cryptography dependency that should work with the OctoPi images.

tjhorner commented 1 week ago

I can confirm that 0.2.1 fixes it. Thank you!