Calibre-web: Upload a cover give 500

Created on 24 Jul 2019  路  2Comments  路  Source: janeczku/calibre-web

Hi,

Thanks for this good project.

I have an issue starting from that commit on master fc4dc36 (latest master at this point).

When editing a book already filled with data, if I upload a cover and submit, after a while it gives me a 500:
image

And I have this stack in the logs:

[2019-07-24 10:59:56,441] ERROR {cps:1891} Exception on /admin/book/114 [POST]
Traceback (most recent call last):
  File "/calibre-web/vendor/flask/app.py", line 2446, in wsgi_app
    response = self.full_dispatch_request()
  File "/calibre-web/vendor/flask/app.py", line 1951, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/calibre-web/vendor/flask/app.py", line 1820, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/calibre-web/vendor/flask/_compat.py", line 39, in reraise
    raise value
  File "/calibre-web/vendor/flask/app.py", line 1949, in full_dispatch_request
    rv = self.dispatch_request()
  File "/calibre-web/vendor/flask/app.py", line 1935, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/calibre-web/cps/web.py", line 146, in decorated_view
    return login_required(func)(*args, **kwargs)
  File "/calibre-web/vendor/flask_login/utils.py", line 261, in decorated_view
    return func(*args, **kwargs)
  File "/calibre-web/cps/web.py", line 227, in inner
    return f(*args, **kwargs)
  File "/calibre-web/cps/editbooks.py", line 397, in edit_book
    if upload_cover(request, book) is True:
  File "/calibre-web/cps/editbooks.py", line 369, in upload_cover
    if helper.save_cover(requested_file, book.path) is True:
  File "/calibre-web/cps/helper.py", line 512, in save_cover
    if ub.config.config_use_google_drive:
AttributeError: module 'cps.ub' has no attribute 'config'

Any clues?

Thanks for your help

bug

All 2 comments

We did some big changes, looks like we missed something, I will fix it this evening.

Should work now again

Was this page helpful?
0 / 5 - 0 ratings