-
-
Notifications
You must be signed in to change notification settings - Fork 147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Latest docker image is missing library, uploading books fails #302
Comments
Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid. |
As per the changelog: |
python-magic has a secondary dependency on libmagic1 which needs to be added to the dockerfiles. Here's mine for arm64 that works now for me with the three missing python libraries which I added to optional-requirements.txt
|
Thanks for the heads up. We'll add the new dep. Btw, you don't need to add the new packages to optional requirements because they are already in the requirements.txt in the latest version. Alternatively, you can use our universal package install mod to install libmagic1 in the latest image container until we PR the fix so you don't need to build your own image. |
Amazing tip, thank you very much! |
Thank you for reminding me this is a thing. Will this method cause any problems down the line once the package is built into the image? I.e., should I try to remember to remove it later, or will it not cause any problems? |
No, it will just say the package is already installed. |
Is there an existing issue for this?
Current Behavior
[2024-07-07 08:04:23,556] ERROR {cps:1414} Exception on /upload [POST]
Traceback (most recent call last):
File "/lsiopy/lib/python3.10/site-packages/flask/app.py", line 2190, in wsgi_app
response = self.full_dispatch_request()
File "/lsiopy/lib/python3.10/site-packages/flask/app.py", line 1486, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/lsiopy/lib/python3.10/site-packages/flask/app.py", line 1484, in full_dispatch_request
rv = self.dispatch_request()
File "/lsiopy/lib/python3.10/site-packages/flask/app.py", line 1469, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File "/app/calibre-web/cps/usermanagement.py", line 35, in decorated_view
return login_required(func)(*args, **kwargs)
File "/lsiopy/lib/python3.10/site-packages/flask_login/utils.py", line 290, in decorated_view
return current_app.ensure_sync(func)(*args, **kwargs)
File "/app/calibre-web/cps/editbooks.py", line 59, in inner
return f(*args, **kwargs)
File "/app/calibre-web/cps/editbooks.py", line 249, in upload
meta, error = file_handling_on_upload(requested_file)
File "/app/calibre-web/cps/editbooks.py", line 755, in file_handling_on_upload
if not validate_mime_type(requested_file, allowed_extensions):
File "/app/calibre-web/cps/file_helper.py", line 49, in validate_mime_type
mime = magic.Magic(mime=True)
NameError: name 'magic' is not defined
Book upload fails
Expected Behavior
Book uploads succeed
Steps To Reproduce
pull latest docker image
--- services: calibre-web: image: lscr.io/linuxserver/calibre-web:0.6.22-ls275 container_name: calibre-web environment: - PUID=1001 - PGID=1002 - TZ=Etc/UTC volumes: - /calibreconfig:/config - /mnt/nfs/calibre-lib:/books ports: - 8083:8083 restart: unless-stopped
try to upload a book to server through UI
Environment
CPU architecture
arm64
Docker creation
Container logs
The text was updated successfully, but these errors were encountered: