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

No cover and book if title contains ' #3057

Open
Restil1789 opened this issue May 23, 2024 · 2 comments
Open

No cover and book if title contains ' #3057

Restil1789 opened this issue May 23, 2024 · 2 comments

Comments

@Restil1789
Copy link

Hello,

If my book title have a ' in his title the book is not working

500 Internal Server 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 "/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/web.py", line 1140, in get_cover
return get_book_cover(book_id, cover_resolution)
File "/app/calibre-web/cps/helper.py", line 745, in get_book_cover
return get_book_cover_internal(book, resolution=resolution)
File "/app/calibre-web/cps/helper.py", line 786, in get_book_cover_internal
return send_from_directory(cover_file_path, "cover.jpg")
File "/lsiopy/lib/python3.10/site-packages/flask/helpers.py", line 557, in send_from_directory
return werkzeug.utils.send_from_directory( # type: ignore[return-value]
File "/lsiopy/lib/python3.10/site-packages/werkzeug/utils.py", line 576, in send_from_directory
return send_file(path, environ, **kwargs)
File "/lsiopy/lib/python3.10/site-packages/werkzeug/utils.py", line 479, in send_file
file = open(path, "rb") # type: ignore
FileNotFoundError: [Errno 2] No such file or directory: "/books/Korita/The Extra's Academy Survival Guide (501)/cover.jpg"

I am on windows, with the docker env

@yunimoo
Copy link
Contributor

yunimoo commented May 26, 2024

thanks will give this a look

@yunimoo
Copy link
Contributor

yunimoo commented May 29, 2024

Can't seem to replicate on my end. Are you adding the book through calibre or upload via calibre web? It seems like the cover.jpg is not found in that path based on your error logs. Does it actually exist in that path? I test uploaded an epub with a ' and was able to load up the book and cover.jpg.

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

2 participants