-
-
Notifications
You must be signed in to change notification settings - Fork 194
Closed
Description
Describe the bug
When i updated metadata for a book i got a 500 error and the book did not update
To Reproduce
Steps to reproduce the behavior:
- Select a book to edit metadata
- Get new metadata (in this case from Hardcover)
- Save the book
Expected behavior
No crash
Logs
Error Message:
Traceback (most recent call last):
File "/lsiopy/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1961, in _exec_single_context
self.dialect.do_execute(
File "/lsiopy/lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 944, in do_execute
cursor.execute(statement, parameters)
sqlite3.InterfaceError: Error binding parameter 0 - probably unsupported type.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/lsiopy/lib/python3.10/site-packages/flask/app.py", line 1473, in wsgi_app
response = self.full_dispatch_request()
File "/lsiopy/lib/python3.10/site-packages/flask/app.py", line 882, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/lsiopy/lib/python3.10/site-packages/flask/app.py", line 880, in full_dispatch_request
rv = self.dispatch_request()
File "/lsiopy/lib/python3.10/site-packages/flask/app.py", line 865, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return]
File "/app/calibre-web/cps/usermanagement.py", line 97, in decorated_view
return login_required(func)(*args, **kwargs)
File "/app/calibre-web/cps/cw_login/utils.py", line 296, in decorated_view
return current_app.ensure_sync(func)(*args, **kwargs)
File "/app/calibre-web/cps/web.py", line 1689, in show_book
return render_title_template('detail.html',
File "/app/calibre-web/cps/render_template.py", line 174, in render_title_template
return render_template(instance=config.config_calibre_web_title, sidebar=sidebar, simple=simple,
File "/lsiopy/lib/python3.10/site-packages/flask/templating.py", line 150, in render_template
return _render(app, template, context)
File "/lsiopy/lib/python3.10/site-packages/flask/templating.py", line 131, in _render
rv = template.render(context)
File "/lsiopy/lib/python3.10/site-packages/jinja2/environment.py", line 1295, in render
self.environment.handle_exception()
File "/lsiopy/lib/python3.10/site-packages/jinja2/environment.py", line 942, in handle_exception
raise rewrite_traceback_stack(source=source)
File "/app/calibre-web/cps/templates/detail.html", line 1, in top-level template code
{% extends is_xhr|yesno("fragment.html", "layout.html") %}
File "/app/calibre-web/cps/templates/layout.html", line 19, in top-level template code
{% block header %}{% endblock %}
File "/app/calibre-web/cps/templates/detail.html", line 5, in block 'header'
{% if entry.comments|length > 0 and entry.comments[0].text|length > 0 %}
File "/lsiopy/lib/python3.10/site-packages/jinja2/environment.py", line 490, in getattr
return getattr(obj, attribute)
File "/lsiopy/lib/python3.10/site-packages/sqlalchemy/orm/attributes.py", line 569, in __get__
return self.impl.get(state, dict_) # type: ignore[no-any-return]
File "/lsiopy/lib/python3.10/site-packages/sqlalchemy/orm/attributes.py", line 1096, in get
value = self._fire_loader_callables(state, key, passive)
File "/lsiopy/lib/python3.10/site-packages/sqlalchemy/orm/attributes.py", line 1131, in _fire_loader_callables
return self.callable_(state, passive)
File "/lsiopy/lib/python3.10/site-packages/sqlalchemy/orm/strategies.py", line 978, in _load_for_state
return self._emit_lazyload(
File "/lsiopy/lib/python3.10/site-packages/sqlalchemy/orm/strategies.py", line 1141, in _emit_lazyload
result = session.execute(
File "/lsiopy/lib/python3.10/site-packages/sqlalchemy/orm/session.py", line 2365, in execute
return self._execute_internal(
File "/lsiopy/lib/python3.10/site-packages/sqlalchemy/orm/session.py", line 2251, in _execute_internal
result: Result[Any] = compile_state_cls.orm_execute_statement(
File "/lsiopy/lib/python3.10/site-packages/sqlalchemy/orm/context.py", line 306, in orm_execute_statement
result = conn.execute(
File "/lsiopy/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1413, in execute
return meth(
File "/lsiopy/lib/python3.10/site-packages/sqlalchemy/sql/elements.py", line 526, in _execute_on_connection
return connection._execute_clauseelement(
File "/lsiopy/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1635, in _execute_clauseelement
ret = self._execute_context(
File "/lsiopy/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1840, in _execute_context
return self._exec_single_context(
File "/lsiopy/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1980, in _exec_single_context
self._handle_dbapi_exception(
File "/lsiopy/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 2349, in _handle_dbapi_exception
raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
File "/lsiopy/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1961, in _exec_single_context
self.dialect.do_execute(
File "/lsiopy/lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 944, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.InterfaceError: (sqlite3.InterfaceError) Error binding parameter 0 - probably unsupported type.
[SQL: SELECT comments.id AS comments_id, comments.book AS comments_book, comments.text AS comments_text
FROM comments
WHERE ? = comments.book]
[parameters: (6,)]
(Background on this error at: https://sqlalche.me/e/20/rvf5)
Docker:
[metadata-change-detector] New file detected: 20250803223750-6.json
Found existing cover page
Existing cover page titlepage.xhtml is a simple wrapper, removing it
------------------------------ REPORT ------------------------------
## Polishing: EPUB
### Updating metadata
Metadata updated
### Setting cover
Cover updated
### Upgrading book, if possible
Updated EPUB from version 2 to 3
----------------------------------------------------------------------
Polishing took: 0.4 seconds
Output written to: /books/James S. A. Corey/Babylon's Ashes (6)/Babylon's Ashes - James S. A. Corey.epub
[cover-metadata-enforcer]: DONE: 'Babylon's Ashes - James S. A. Corey.epub': Cover & Metadata updated
CWA Logs
[2025-08-03 22:38:31,656] ERROR {cps:838} Exception on /book/6 [GET]
Traceback (most recent call last):
File "/lsiopy/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1961, in _exec_single_context
self.dialect.do_execute(
File "/lsiopy/lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 944, in do_execute
cursor.execute(statement, parameters)
sqlite3.InterfaceError: Error binding parameter 0 - probably unsupported type.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/lsiopy/lib/python3.10/site-packages/flask/app.py", line 1473, in wsgi_app
response = self.full_dispatch_request()
File "/lsiopy/lib/python3.10/site-packages/flask/app.py", line 882, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/lsiopy/lib/python3.10/site-packages/flask/app.py", line 880, in full_dispatch_request
rv = self.dispatch_request()
File "/lsiopy/lib/python3.10/site-packages/flask/app.py", line 865, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return]
File "/app/calibre-web/cps/usermanagement.py", line 97, in decorated_view
return login_required(func)(*args, **kwargs)
File "/app/calibre-web/cps/cw_login/utils.py", line 296, in decorated_view
return current_app.ensure_sync(func)(*args, **kwargs)
File "/app/calibre-web/cps/web.py", line 1689, in show_book
return render_title_template('detail.html',
File "/app/calibre-web/cps/render_template.py", line 174, in render_title_template
return render_template(instance=config.config_calibre_web_title, sidebar=sidebar, simple=simple,
File "/lsiopy/lib/python3.10/site-packages/flask/templating.py", line 150, in render_template
return _render(app, template, context)
File "/lsiopy/lib/python3.10/site-packages/flask/templating.py", line 131, in _render
rv = template.render(context)
File "/lsiopy/lib/python3.10/site-packages/jinja2/environment.py", line 1295, in render
self.environment.handle_exception()
File "/lsiopy/lib/python3.10/site-packages/jinja2/environment.py", line 942, in handle_exception
raise rewrite_traceback_stack(source=source)
File "/app/calibre-web/cps/templates/detail.html", line 1, in top-level template code
{% extends is_xhr|yesno("fragment.html", "layout.html") %}
File "/app/calibre-web/cps/templates/layout.html", line 19, in top-level template code
{% block header %}{% endblock %}
File "/app/calibre-web/cps/templates/detail.html", line 5, in block 'header'
{% if entry.comments|length > 0 and entry.comments[0].text|length > 0 %}
File "/lsiopy/lib/python3.10/site-packages/jinja2/environment.py", line 490, in getattr
return getattr(obj, attribute)
File "/lsiopy/lib/python3.10/site-packages/sqlalchemy/orm/attributes.py", line 569, in __get__
return self.impl.get(state, dict_) # type: ignore[no-any-return]
File "/lsiopy/lib/python3.10/site-packages/sqlalchemy/orm/attributes.py", line 1096, in get
value = self._fire_loader_callables(state, key, passive)
File "/lsiopy/lib/python3.10/site-packages/sqlalchemy/orm/attributes.py", line 1131, in _fire_loader_callables
return self.callable_(state, passive)
File "/lsiopy/lib/python3.10/site-packages/sqlalchemy/orm/strategies.py", line 978, in _load_for_state
return self._emit_lazyload(
File "/lsiopy/lib/python3.10/site-packages/sqlalchemy/orm/strategies.py", line 1141, in _emit_lazyload
result = session.execute(
File "/lsiopy/lib/python3.10/site-packages/sqlalchemy/orm/session.py", line 2365, in execute
return self._execute_internal(
File "/lsiopy/lib/python3.10/site-packages/sqlalchemy/orm/session.py", line 2251, in _execute_internal
result: Result[Any] = compile_state_cls.orm_execute_statement(
File "/lsiopy/lib/python3.10/site-packages/sqlalchemy/orm/context.py", line 306, in orm_execute_statement
result = conn.execute(
File "/lsiopy/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1413, in execute
return meth(
File "/lsiopy/lib/python3.10/site-packages/sqlalchemy/sql/elements.py", line 526, in _execute_on_connection
return connection._execute_clauseelement(
File "/lsiopy/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1635, in _execute_clauseelement
ret = self._execute_context(
File "/lsiopy/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1840, in _execute_context
return self._exec_single_context(
File "/lsiopy/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1980, in _exec_single_context
self._handle_dbapi_exception(
File "/lsiopy/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 2349, in _handle_dbapi_exception
raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
File "/lsiopy/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1961, in _exec_single_context
self.dialect.do_execute(
File "/lsiopy/lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 944, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.InterfaceError: (sqlite3.InterfaceError) Error binding parameter 0 - probably unsupported type.
[SQL: SELECT comments.id AS comments_id, comments.book AS comments_book, comments.text AS comments_text
FROM comments
WHERE ? = comments.book]
[parameters: (6,)]
(Background on this error at: https://sqlalche.me/e/20/rvf5)
Configuration(please complete the following information):
- OS: UnRaid Docker Compose
- Hardware: x86 server
- Version: V3.1.1
LogFelix
Metadata
Metadata
Assignees
Labels
No labels