janeczku / calibre-web

:books: Web app for browsing, reading and downloading eBooks stored in a Calibre database
GNU General Public License v3.0
12.01k stars 1.28k forks source link

Calibre web not working anymore (internal server error) #3018

Closed wiebereu closed 3 months ago

wiebereu commented 3 months ago

Short Notice from the maintainer

After 6 years of more or less intensive programming on Calibre-Web, I need a break. The last few months, maintaining Calibre-Web has felt more like work than a hobby. I felt pressured and teased by people to solve "their" problems and merge PRs for "their" Calibre-Web. I have turned off all notifications from Github/Discord and will now concentrate undisturbed on the development of “my” Calibre-Web over the next few weeks/months.
I will look into the issues and maybe also the PRs from time to time, but don't expect a quick response from me.

Please also have a look at our Contributing Guidelines

Describe the bug/problem

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:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Logfile

Add content of calibre-web.log file or the relevant error, try to reproduce your problem with "debug" log-level to get more output.

Expected behavior

A clear and concise description of what you expected to happen.

Screenshots

If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

Additional context Add any other context about the problem here. [e.g. access via reverse proxy, database background sync, special database location]

wiebereu commented 3 months ago

Suddenly my Calibre web stopped working. Ik deleted the app and installed it again but to no avail. It showed me a 500 internal server error

Here are the errors I receive

Traceback (most recent call last): File "/lsiopy/lib/python3.10/site-packages/flask/app.py", line 2190, in wsgi_app response = self.full_dispatch_request() File "/lsiopy/lib/python3.10/site-packages/flask/app.py", line 1486, in full_dispatch_request rv = self.handle_user_exception(e) File "/lsiopy/lib/python3.10/site-packages/flask/app.py", line 1484, in full_dispatch_request rv = self.dispatch_request() File "/lsiopy/lib/python3.10/site-packages/flask/app.py", line 1469, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(view_args) File "/app/calibre-web/cps/usermanagement.py", line 35, in decorated_view return login_required(func)(*args, *kwargs) File "/lsiopy/lib/python3.10/site-packages/flask_login/utils.py", line 290, in decorated_view return current_app.ensure_sync(func)(args, kwargs) File "/app/calibre-web/cps/web.py", line 790, in index return render_books_list("newest", sort_param, 1, page) File "/app/calibre-web/cps/web.py", line 408, 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 803, 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 810, in fill_indexpage_with_archived_books random_query = self.generate_linked_query(config_read_column, database) File "/app/calibre-web/cps/db.py", line 764, in generate_linked_query query = (self.session.query(database, ub.ArchivedBook.is_archived, ub.ReadBook.read_status) AttributeError: 'NoneType' object has no attribute 'query'

IceflowRE commented 3 months ago

What happens if you use another database?

wiebereu commented 3 months ago

What happens if you use another database?

I have only one Calibre database and my Calibre is working perfectly

OzzieIsaacs commented 3 months ago

Using docker?

IceflowRE commented 3 months ago

What happens if you use another database?

I have only one Calibre database and my Calibre is working perfectly

It could be that the database is corrupted, try using another database, change the database path and copy a fresh database to another place and choose this. If nothing changes the installation might be the issue.

jamesbiederbeck commented 3 months ago

I'm not convinced it's an issue with this repo. Please share your docker details.

wiebereu commented 3 months ago

Suddenly it starts working again. I haven't done anything, but I'm glad it works again