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

Calibre-Web Internal Server Error #2208

Closed
jfshen06 opened this issue Dec 6, 2021 · 1 comment
Closed

Calibre-Web Internal Server Error #2208

jfshen06 opened this issue Dec 6, 2021 · 1 comment
Labels

Comments

@jfshen06
Copy link

jfshen06 commented Dec 6, 2021

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 "/usr/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1799, in _execute_context
self.dialect.do_execute(
File "/usr/lib/python3.8/site-packages/sqlalchemy/engine/default.py", line 717, in do_execute
cursor.execute(statement, parameters)
sqlite3.DatabaseError: database disk image is malformed
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/flask/app.py", line 2073, in wsgi_app
response = self.full_dispatch_request()
File "/usr/lib/python3.8/site-packages/flask/app.py", line 1518, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/lib/python3.8/site-packages/flask/app.py", line 1516, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/lib/python3.8/site-packages/flask/app.py", line 1502, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
File "/calibre-web/app/cps/usermanagement.py", line 38, in decorated_view
return login_required(func)(*args, **kwargs)
File "/usr/lib/python3.8/site-packages/flask_login/utils.py", line 272, in decorated_view
return func(*args, **kwargs)
File "/calibre-web/app/cps/web.py", line 744, in index
return render_books_list("newest", sort_param, 1, page)
File "/calibre-web/app/cps/web.py", line 408, in render_books_list
entries, random, pagination = calibre_db.fill_indexpage(page, 0, db.Books, True, order,
File "/calibre-web/app/cps/db.py", line 679, in fill_indexpage
return self.fill_indexpage_with_archived_books(page, pagesize, database, db_filter, order, False, *join)
File "/calibre-web/app/cps/db.py", line 685, in fill_indexpage_with_archived_books
randm = self.session.query(Books)
File "/usr/lib/python3.8/site-packages/sqlalchemy/orm/query.py", line 2711, in all
return self._iter().all()
File "/usr/lib/python3.8/site-packages/sqlalchemy/orm/query.py", line 2846, in _iter
result = self.session.execute(
File "/usr/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 1689, in execute
result = conn._execute_20(statement, params or {}, execution_options)
File "/usr/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1611, in _execute_20
return meth(self, args_10style, kwargs_10style, execution_options)
File "/usr/lib/python3.8/site-packages/sqlalchemy/sql/elements.py", line 325, in _execute_on_connection
return connection._execute_clauseelement(
File "/usr/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1478, in _execute_clauseelement
ret = self._execute_context(
File "/usr/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1842, in _execute_context
self.handle_dbapi_exception(
File "/usr/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 2023, in handle_dbapi_exception
util.raise
(
File "/usr/lib/python3.8/site-packages/sqlalchemy/util/compat.py", line 207, in raise

raise exception
File "/usr/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1799, in _execute_context
self.dialect.do_execute(
File "/usr/lib/python3.8/site-packages/sqlalchemy/engine/default.py", line 717, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.DatabaseError: (sqlite3.DatabaseError) database disk image is malformed
[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
FROM books
WHERE (books.id NOT IN (SELECT 1 FROM (SELECT 1) WHERE 1!=1)) ORDER BY random()
LIMIT ? OFFSET ?]
[parameters: (4, 0)]
(Background on this error at: https://sqlalche.me/e/14/4xp6)

@OzzieIsaacs
Copy link
Collaborator

Your calibre database is defect. Please try to perform a library repair from within calibre itself

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

No branches or pull requests

2 participants