Skip to content
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

calibre-web: upload ebook failure #1133

Open
Nigatsu opened this issue Dec 6, 2024 · 0 comments
Open

calibre-web: upload ebook failure #1133

Nigatsu opened this issue Dec 6, 2024 · 0 comments

Comments

@Nigatsu
Copy link

Nigatsu commented Dec 6, 2024

When trying to upload an ebook I get 500 error:

The server encountered an internal error and was unable to complete your request. There is an error in the application.

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 2190, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1486, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1484, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1469, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
  File "/tmp/calibre-web/cps/usermanagement.py", line 35, in decorated_view
    return login_required(func)(*args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/flask_login/utils.py", line 290, in decorated_view
    return current_app.ensure_sync(func)(*args, **kwargs)
  File "/tmp/calibre-web/cps/editbooks.py", line 59, in inner
    return f(*args, **kwargs)
  File "/tmp/calibre-web/cps/editbooks.py", line 249, in upload
    meta, error = file_handling_on_upload(requested_file)
  File "/tmp/calibre-web/cps/editbooks.py", line 755, in file_handling_on_upload
    if not validate_mime_type(requested_file, allowed_extensions):
  File "/tmp/calibre-web/cps/file_helper.py", line 49, in validate_mime_type
    mime = magic.Magic(mime=True)

NameError: name 'magic' is not defined

It's probably related to not up-to-date python inside elfhosted/containers/calibre-web image. A similar problem was discussed on calibre-web repo.
Tried to use linuxserver/calibre-web image as a custom app and it worked flawlessly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant