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

Convert Mobi to Epub and send to E-Reader causes 500 internal server error #2494

Closed
JamesGardiner opened this issue Jul 20, 2022 · 0 comments

Comments

@JamesGardiner
Copy link

Describe the bug/problem
After clicking the Convert Mobi to Epub and send to E-Reader button in the Send to E-Reader dropdown menu, a 500 internal server error is displayed with the following traceback:

Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 2073, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1518, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1516, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1502, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
File "/usr/local/lib/python3.8/dist-packages/flask_login/utils.py", line 303, in decorated_view
return current_app.ensure_sync(func)(*args, **kwargs)
File "/app/calibre-web/cps/web.py", line 113, in inner
return f(*args, **kwargs)
File "/app/calibre-web/cps/web.py", line 1196, in send_to_ereader
result = send_mail(book_id, book_format, convert, current_user.kindle_mail, config.config_calibre_dir,
File "/app/calibre-web/cps/helper.py", line 215, in send_mail
return convert_book_format(book_id, calibrepath, u'epub', book_format.lower(), user_id, ereader_mail)
File "/app/calibre-web/cps/helper.py", line 78, in convert_book_format
file_path = os.path.join(calibre_path, book.path, data.name)
AttributeError: 'NoneType' object has no attribute 'name'

To Reproduce
Steps to reproduce the behavior:

  1. Go to the books view
  2. Click on a book that you have an epub version of
  3. Click Send to e-reader
  4. Click Convert Mobi to Epub and send to E-Reader
  5. See error

Logfile
Add content of calibre-web.log file or the relevant error, try to reproduce your problem with "debug" log-level to get more output.

Expected behavior
The books should be converted to mobi and send to the correct e-reader for the user

Environment (please complete the following information):

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

No branches or pull requests

2 participants