A clear and concise description of what the bug is. If you are asking for support, please check our Wiki if your question is already answered there.
To Reproduce
Steps to reproduce the behavior:
See error
Logfile
Calibre-Web
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/sqlalchemy/engine/base.py", line 1815, in _execute_context
context = constructor(
File "/lsiopy/lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 1418, in _init_compiled
self.cursor = self.create_cursor()
File "/lsiopy/lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 1752, in create_cursor
return self.create_default_cursor()
File "/lsiopy/lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 1758, in create_default_cursor
return self._dbapi_connection.cursor()
File "/lsiopy/lib/python3.10/site-packages/sqlalchemy/pool/base.py", line 1485, in cursor
return self.dbapi_connection.cursor(args, kwargs)
sqlite3.ProgrammingError: Cannot operate on a closed database.
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 807, in index
return render_books_list("newest", sort_param, 1, page)
File "/app/calibre-web/cps/web.py", line 413, in render_books_list
entries, random, pagination = calibre_db.fill_indexpage(page, 0, db.Books, True, order[0],
File "/app/calibre-web/cps/db.py", line 818, in fill_indexpage
return self.fill_indexpage_with_archived_books(page, database, pagesize, db_filter, order, False,
File "/app/calibre-web/cps/db.py", line 828, in fill_indexpage_with_archived_books
.limit(self.config.config_random_books).all())
File "/lsiopy/lib/python3.10/site-packages/sqlalchemy/orm/query.py", line 2673, in all
return self._iter().all() # type: ignore
File "/lsiopy/lib/python3.10/site-packages/sqlalchemy/orm/query.py", line 2827, in _iter
result: Union[ScalarResult[_T], Result[_T]] = self.session.execute(
File "/lsiopy/lib/python3.10/site-packages/sqlalchemy/orm/session.py", line 2362, in execute
return self._execute_internal(
File "/lsiopy/lib/python3.10/site-packages/sqlalchemy/orm/session.py", line 2247, in _execute_internal
result: Result[Any] = compile_state_cls.orm_execute_statement(
File "/lsiopy/lib/python3.10/site-packages/sqlalchemy/orm/context.py", line 293, in orm_execute_statement
result = conn.execute(
File "/lsiopy/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1418, in execute
return meth(
File "/lsiopy/lib/python3.10/site-packages/sqlalchemy/sql/elements.py", line 515, in _execute_on_connection
return connection._execute_clauseelement(
File "/lsiopy/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1640, in _execute_clauseelement
ret = self._execute_context(
File "/lsiopy/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1821, in _execute_context
self._handle_dbapi_exception(
File "/lsiopy/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 2355, 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 1815, in _execute_context
context = constructor(
File "/lsiopy/lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 1418, in _init_compiled
self.cursor = self.create_cursor()
File "/lsiopy/lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 1752, in create_cursor
return self.create_default_cursor()
File "/lsiopy/lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 1758, in create_default_cursor
return self._dbapi_connection.cursor()
File "/lsiopy/lib/python3.10/site-packages/sqlalchemy/pool/base.py", line 1485, in cursor
return self.dbapi_connection.cursor(args, kwargs)
sqlalchemy.exc.ProgrammingError: (sqlite3.ProgrammingError) Cannot operate on a closed database.
[SQL: SELECT books.id AS books_id, books.title AS books_title, books.sort AS books_sort, books.author_sort AS books_author_sort, books.timestamp AS books_timestamp, books.pubdate AS books_pubdate, books.series_index AS books_series_index, books.last_modified AS books_last_modified, books.path AS books_path, books.has_cover AS books_has_cover, books.uuid AS books_uuid, books.isbn AS books_isbn, books.flags AS books_flags, archived_book.is_archived AS archived_book_is_archived, book_read_link.read_status AS book_read_link_read_status
FROM books LEFT OUTER JOIN book_read_link ON book_read_link.user_id = ? AND book_read_link.book_id = books.id LEFT OUTER JOIN archived_book ON books.id = archived_book.book_id AND archived_book.user_id = ?
WHERE (books.id NOT IN (__[POSTCOMPILE_id_1])) ORDER BY random()
LIMIT ? OFFSET ?]
[parameters: [{}]]
(Background on this error at: https://sqlalche.me/e/20/f405)
Add content of calibre-web.log file or the relevant error, try to reproduce your problem with "debug" log-level to get more output.
500 server error
A clear and concise description of what the bug is. If you are asking for support, please check our Wiki if your question is already answered there.
To Reproduce
Steps to reproduce the behavior:
Logfile
Calibre-Web 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/sqlalchemy/engine/base.py", line 1815, in _execute_context context = constructor( File "/lsiopy/lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 1418, in _init_compiled self.cursor = self.create_cursor() File "/lsiopy/lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 1752, in create_cursor return self.create_default_cursor() File "/lsiopy/lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 1758, in create_default_cursor return self._dbapi_connection.cursor() File "/lsiopy/lib/python3.10/site-packages/sqlalchemy/pool/base.py", line 1485, in cursor return self.dbapi_connection.cursor(args, kwargs) sqlite3.ProgrammingError: Cannot operate on a closed database. 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 807, in index return render_books_list("newest", sort_param, 1, page) File "/app/calibre-web/cps/web.py", line 413, in render_books_list entries, random, pagination = calibre_db.fill_indexpage(page, 0, db.Books, True, order[0], File "/app/calibre-web/cps/db.py", line 818, in fill_indexpage return self.fill_indexpage_with_archived_books(page, database, pagesize, db_filter, order, False, File "/app/calibre-web/cps/db.py", line 828, in fill_indexpage_with_archived_books .limit(self.config.config_random_books).all()) File "/lsiopy/lib/python3.10/site-packages/sqlalchemy/orm/query.py", line 2673, in all return self._iter().all() # type: ignore File "/lsiopy/lib/python3.10/site-packages/sqlalchemy/orm/query.py", line 2827, in _iter result: Union[ScalarResult[_T], Result[_T]] = self.session.execute( File "/lsiopy/lib/python3.10/site-packages/sqlalchemy/orm/session.py", line 2362, in execute return self._execute_internal( File "/lsiopy/lib/python3.10/site-packages/sqlalchemy/orm/session.py", line 2247, in _execute_internal result: Result[Any] = compile_state_cls.orm_execute_statement( File "/lsiopy/lib/python3.10/site-packages/sqlalchemy/orm/context.py", line 293, in orm_execute_statement result = conn.execute( File "/lsiopy/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1418, in execute return meth( File "/lsiopy/lib/python3.10/site-packages/sqlalchemy/sql/elements.py", line 515, in _execute_on_connection return connection._execute_clauseelement( File "/lsiopy/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1640, in _execute_clauseelement ret = self._execute_context( File "/lsiopy/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1821, in _execute_context self._handle_dbapi_exception( File "/lsiopy/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 2355, 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 1815, in _execute_context context = constructor( File "/lsiopy/lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 1418, in _init_compiled self.cursor = self.create_cursor() File "/lsiopy/lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 1752, in create_cursor return self.create_default_cursor() File "/lsiopy/lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 1758, in create_default_cursor return self._dbapi_connection.cursor() File "/lsiopy/lib/python3.10/site-packages/sqlalchemy/pool/base.py", line 1485, in cursor return self.dbapi_connection.cursor(args, kwargs) sqlalchemy.exc.ProgrammingError: (sqlite3.ProgrammingError) Cannot operate on a closed database. [SQL: SELECT books.id AS books_id, books.title AS books_title, books.sort AS books_sort, books.author_sort AS books_author_sort, books.timestamp AS books_timestamp, books.pubdate AS books_pubdate, books.series_index AS books_series_index, books.last_modified AS books_last_modified, books.path AS books_path, books.has_cover AS books_has_cover, books.uuid AS books_uuid, books.isbn AS books_isbn, books.flags AS books_flags, archived_book.is_archived AS archived_book_is_archived, book_read_link.read_status AS book_read_link_read_status FROM books LEFT OUTER JOIN book_read_link ON book_read_link.user_id = ? AND book_read_link.book_id = books.id LEFT OUTER JOIN archived_book ON books.id = archived_book.book_id AND archived_book.user_id = ? WHERE (books.id NOT IN (__[POSTCOMPILE_id_1])) ORDER BY random() LIMIT ? OFFSET ?] [parameters: [{}]] (Background on this error at: https://sqlalche.me/e/20/f405) Add content of calibre-web.log file or the relevant error, try to reproduce your problem with "debug" log-level to get more output.