iiab / calibre-web

:books: Web app for browsing, reading and downloading eBooks stored in a Calibre database
GNU General Public License v3.0
3 stars 4 forks source link

Calibre-Web installs but fails to work [502 Bad Gateway] "on every recent Raspberry Pi OS install" — ModuleNotFoundError: No module named 'cryptography' #260

Open holta opened 4 hours ago

holta commented 4 hours ago

Thanks @EMG70 for reporting!

Excerpt from his iiab-diagnostics (https://paste.centos.org/view/e76439c0) here:

=IIAB==========================================================================
COMMAND: /usr/bin/systemctl status calibre-web    # Is Calibre-Web running?

× calibre-web.service - Calibre-Web
     Loaded: loaded (/etc/systemd/system/calibre-web.service; enabled; preset: enabled)
     Active: failed (Result: exit-code) since Thu 2024-09-26 15:28:47 BST; 3min 31s ago
   Duration: 5.596s
   Main PID: 575 (code=exited, status=1/FAILURE)
        CPU: 2.231s

Sep 26 15:28:47 box python3[575]:   File "/usr/local/calibre-web-py3/cps.py", line 28, in <module>
Sep 26 15:28:47 box python3[575]:     from cps.main import main
Sep 26 15:28:47 box python3[575]:   File "/usr/local/calibre-web-py3/cps/__init__.py", line 40, in <module>
Sep 26 15:28:47 box python3[575]:     from . import config_sql
Sep 26 15:28:47 box python3[575]:   File "/usr/local/calibre-web-py3/cps/config_sql.py", line 27, in <module>
Sep 26 15:28:47 box python3[575]:     from cryptography.fernet import Fernet
Sep 26 15:28:47 box python3[575]: ModuleNotFoundError: No module named 'cryptography'
Sep 26 15:28:47 box systemd[1]: calibre-web.service: Main process exited, code=exited, status=1/FAILURE
Sep 26 15:28:47 box systemd[1]: calibre-web.service: Failed with result 'exit-code'.
Sep 26 15:28:47 box systemd[1]: calibre-web.service: Consumed 2.231s CPU time.

=IIAB==========================================================================
COMMAND: /usr/bin/journalctl -u calibre-web | tail -100    # Calibre-Web systemd log

Sep 26 15:19:00 box systemd[1]: Started calibre-web.service - Calibre-Web.
Sep 26 15:19:02 box python3[26014]: Traceback (most recent call last):
Sep 26 15:19:02 box python3[26014]:   File "/usr/local/calibre-web-py3/cps.py", line 28, in <module>
Sep 26 15:19:02 box python3[26014]:     from cps.main import main
Sep 26 15:19:02 box python3[26014]:   File "/usr/local/calibre-web-py3/cps/__init__.py", line 40, in <module>
Sep 26 15:19:02 box python3[26014]:     from . import config_sql
Sep 26 15:19:02 box python3[26014]:   File "/usr/local/calibre-web-py3/cps/config_sql.py", line 27, in <module>
Sep 26 15:19:02 box python3[26014]:     from cryptography.fernet import Fernet
Sep 26 15:19:02 box python3[26014]: ModuleNotFoundError: No module named 'cryptography'
Sep 26 15:19:03 box systemd[1]: calibre-web.service: Main process exited, code=exited, status=1/FAILURE
Sep 26 15:19:03 box systemd[1]: calibre-web.service: Failed with result 'exit-code'.
Sep 26 15:19:03 box systemd[1]: calibre-web.service: Consumed 2.270s CPU time.
-- Boot 9dc10f09d20241c3990f05a440f96b5a --
Sep 26 15:23:27 box systemd[1]: Started calibre-web.service - Calibre-Web.
Sep 26 15:23:33 box python3[592]: Traceback (most recent call last):
Sep 26 15:23:33 box python3[592]:   File "/usr/local/calibre-web-py3/cps.py", line 28, in <module>
Sep 26 15:23:33 box python3[592]:     from cps.main import main
Sep 26 15:23:33 box python3[592]:   File "/usr/local/calibre-web-py3/cps/__init__.py", line 40, in <module>
Sep 26 15:23:33 box python3[592]:     from . import config_sql
Sep 26 15:23:33 box python3[592]:   File "/usr/local/calibre-web-py3/cps/config_sql.py", line 27, in <module>
Sep 26 15:23:33 box python3[592]:     from cryptography.fernet import Fernet
Sep 26 15:23:33 box python3[592]: ModuleNotFoundError: No module named 'cryptography'
Sep 26 15:23:33 box systemd[1]: calibre-web.service: Main process exited, code=exited, status=1/FAILURE
Sep 26 15:23:33 box systemd[1]: calibre-web.service: Failed with result 'exit-code'.
Sep 26 15:23:33 box systemd[1]: calibre-web.service: Consumed 2.147s CPU time.
-- Boot b31bf14330474d1cbd2acf8461372eb0 --
Sep 26 15:28:41 box systemd[1]: Started calibre-web.service - Calibre-Web.
Sep 26 15:28:47 box python3[575]: Traceback (most recent call last):
Sep 26 15:28:47 box python3[575]:   File "/usr/local/calibre-web-py3/cps.py", line 28, in <module>
Sep 26 15:28:47 box python3[575]:     from cps.main import main
Sep 26 15:28:47 box python3[575]:   File "/usr/local/calibre-web-py3/cps/__init__.py", line 40, in <module>
Sep 26 15:28:47 box python3[575]:     from . import config_sql
Sep 26 15:28:47 box python3[575]:   File "/usr/local/calibre-web-py3/cps/config_sql.py", line 27, in <module>
Sep 26 15:28:47 box python3[575]:     from cryptography.fernet import Fernet
Sep 26 15:28:47 box python3[575]: ModuleNotFoundError: No module named 'cryptography'
Sep 26 15:28:47 box systemd[1]: calibre-web.service: Main process exited, code=exited, status=1/FAILURE
Sep 26 15:28:47 box systemd[1]: calibre-web.service: Failed with result 'exit-code'.
Sep 26 15:28:47 box systemd[1]: calibre-web.service: Consumed 2.231s CPU time.
holta commented 4 hours ago

Another excerpt from the above iiab-diagnostics, just for the record!

=IIAB==========================================================================
COMMAND: cd /usr/local/calibre-web-py3; sudo git log --graph --oneline --decorate | head -50    # Calibre-Web version

*   bf685667 (HEAD -> master, origin/master, origin/HEAD) Merge branch 'janeczku:master' into master
|\  
| * 1eb9cd44 Improve message on error cover downlaod
| * eb656348 Fix #3153 (In Firefox, Github OAuth login goes into infinite redirect loops)
| * 2f39e51e Fix for #3151 (Invalid amazon link for uk)
| * 884f7666 Integrate advocate and change netiface requirement
| *   c54e9fe5 Updated slovenian language
| |\  
| | * d82944d0 Updated Slovenian translation
| |/  
* | 2f7ae47e Merge branch 'janeczku:master' into master
|\|
| * 97764acb Added missing locale for datepicker in Slovenian language
| * 53f0647c New Slovenian translation
| * b5ee07eb Revert "Update Slovenian translation"
| * 5fe13f53 Update Slovenian translation
| * 89a1dcfb Fix for #3145 (improved contrast for epub reader headline)
| * 10d0542e Removed obsolete code
| *   111c93c3 Merge remote-tracking branch 'it/patch-1'
| |\  
| | * 2d7cf1e6 Update italian
| * | 1d9471b2 Possible fix for #3150 (Invalid cross-device link) without coping metadata
| * | 88cb58c2 Fix for load metadata from amazon
| |/  
* | 486b7bbc Merge branch 'janeczku:master' into master
|\|
| * 481237dc Fix for #3131 (Enable/Disable "Separate Book Files from Library" issue)
| * 5e9dfc07 Test update
* |   265bb088 Merge pull request #242 from holta/update_title_sort-TO-create_functions
|\ \  
| * | 0035e822 cps/editbooks.py: RENAME update_title_sort TO create_functions FOR PR #240
|/ /  
* |   16a1d69f Merge pull request #240 from holta/12-upstream-commits
|\ \  
| * | 8c3ed8e0 12 upstream commits, 29 files changes, 2 merge conflicts resolved (cps/editbooks.py cps/uploader.py)
|/| |
| |/  
| *   ce720f40 Shelf sort algorithm is now saved (#3003)
| |\  
| | * c92115fa Update save shelf sort algorithm
| * | a1f9f03f Fix for #3130 (only last e-mail address is saved when specifying multiple e-reader mail addresses in user settings)
| * | 6a504673 Merge branch 'Develop':
| |\|
| | * 839118e4 Bugfixes from testrun
| | * fd730f66 Bugfix generate thumbnails on gdrive
| | * 1be0ff96 Bugfix load metadata Bugfix xchange author and title Better handling of incompatible iso-639 module on python3.12
| | * 6717683a Improvements merge metadata upload format Music icon only visible once if more than one audio format available
| | * 0f9b5d08 Fix cover handling on upload formats
| | * 1eb77c9c Upload (multiple) book formats with progress and merge the corresponding metadata into the book
| | * d8d9d405 First step format upload with progress

=IIAB==========================================================================
COMMAND: /usr/bin/sudo lb --version    # xklb version

2.9.058

=IIAB==========================================================================
COMMAND: /usr/bin/sudo yt-dlp --version    # yt-dlp version

2024.08.06
holta commented 1 hour ago

@deldesir investigated, and FYI was unable to reproduce this during a fresh install of SMALL-sized IIAB on 64-bit Raspberry Pi OS Lite on RPi 5!

holta commented 3 minutes ago