YunoHost-Apps / calibreweb_ynh

Calibre-web package for YunoHost
GNU General Public License v3.0
18 stars 8 forks source link

500 Internal Server Error: The server encountered an internal error and was unable to complete your request when trying to edit metadata #103

Closed TiberiusRegenschein closed 2 years ago

TiberiusRegenschein commented 2 years ago

I am on the latest yunohost version (4.3.6.3 (stable).on buster with all the latest system and app (version 0.6.18) updates installed.

calibreweb is running without issues besides editing metadata. This was working before and stopped working recently with an update of system files. I can unfortunately not trace back which updated system file caused the error.

I can open books and get the book overview. Clicking on "edit metadata gets me to the following error message:

500 Internal Server Error: The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application. Traceback (most recent call last): File "/var/www/calibreweb/vendor/flask/app.py", line 2077, in wsgi_app response = self.full_dispatch_request() File "/var/www/calibreweb/vendor/flask/app.py", line 1525, in full_dispatch_request rv = self.handle_user_exception(e) File "/var/www/calibreweb/vendor/flask/app.py", line 1523, in full_dispatch_request rv = self.dispatch_request() File "/var/www/calibreweb/vendor/flask/app.py", line 1509, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(req.view_args) File "/var/www/calibreweb/cps/usermanagement.py", line 35, in decorated_view return login_required(func)(*args, *kwargs) File "/var/www/calibreweb/vendor/flask_login/utils.py", line 272, in decorated_view return func(args, kwargs) File "/var/www/calibreweb/cps/editbooks.py", line 69, in inner return f(*args, *kwargs) File "/var/www/calibreweb/cps/editbooks.py", line 745, in show_edit_book return render_edit_book(book_id) File "/var/www/calibreweb/cps/editbooks.py", line 411, in render_edit_book source_formats=valid_source_formats) File "/var/www/calibreweb/cps/render_template.py", line 124, in render_title_template args, **kwargs) File "/var/www/calibreweb/vendor/flask/templating.py", line 151, in render_template ctx.app, File "/var/www/calibreweb/vendor/flask/templating.py", line 128, in _render rv = template.render(context) File "/var/www/calibreweb/vendor/jinja2/environment.py", line 1301, in render self.environment.handle_exception() File "/var/www/calibreweb/vendor/jinja2/environment.py", line 936, in handle_exception raise rewrite_traceback_stack(source=source) File "/var/www/calibreweb/cps/templates/book_edit.html", line 1, in top-level template code {% extends "layout.html" %} File "/var/www/calibreweb/cps/templates/layout.html", line 150, in top-level template code {% block body %}{% endblock %} File "/var/www/calibreweb/cps/templates/book_edit.html", line 179, in block 'body' {% for opt in c.get_display_dict().enum_values %} File "/var/www/calibreweb/cps/db.py", line 389, in get_display_dict display_dict = ast.literal_eval(self.display) File "/usr/lib/python3.7/ast.py", line 91, in literal_eval return _convert(node_or_string) File "/usr/lib/python3.7/ast.py", line 79, in _convert map(_convert, node.values))) File "/usr/lib/python3.7/ast.py", line 90, in _convert return _convert_signed_num(node) File "/usr/lib/python3.7/ast.py", line 63, in _convert_signed_num return _convert_num(node) File "/usr/lib/python3.7/ast.py", line 55, in _convert_num raise ValueError('malformed node or string: ' + repr(node)) ValueError: malformed node or string: <_ast.Name object at 0x7f2efc4ad358>

Thank you very much for looking into the issue

Krakinou commented 2 years ago

Hello, At first sight, I'm not sure this is a package issue but rather it seems that it's the upstream application that is faulty. You can give a look at the issue tracker here

OzzieIsaacs commented 2 years ago

It‘s this one: https://github.com/janeczku/calibre-web/issues/2398 Fixed in latest release of calibre-web upstream

Krakinou commented 2 years ago

Should be solved with the move to 0.6.19 #105