iiab / calibre-web

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

Error downloading first video on an new install: no such table: main.media_fts #276

Closed deldesir closed 2 weeks ago

deldesir commented 1 month ago

image

The metadata fetch task failed with the following error:

root@box:/opt/iiab/iiab# tail -f /var/log/calibre-web.log
[2024-10-28 10:34:32,887]  INFO {cps.tasks.metadata_extract:155} Starting to fetch metadata for URL: https://www.youtube.com/watch?v=_vDZmVXtA7k
[2024-10-28 10:34:36,219] ERROR {cps.services.worker:202} no such table: main.media_fts
Traceback (most recent call last):
  File "/usr/local/calibre-web-py3/cps/services/worker.py", line 199, in start
    self.run(*args)
  File "/usr/local/calibre-web-py3/cps/tasks/metadata_extract.py", line 169, in run
    self._remove_shorts_from_db(conn)
  File "/usr/local/calibre-web-py3/cps/tasks/metadata_extract.py", line 59, in _remove_shorts_from_db
    conn.execute("DELETE FROM media WHERE path LIKE '%shorts%'")
sqlite3.OperationalError: no such table: main.media_fts

xklb and yt-dlp in use:

root@box:/opt/iiab/iiab# lb --version
3.0.016
root@box:/opt/iiab/iiab# yt-dlp --version
2024.10.22
deldesir commented 1 month ago

This bug does not affect dev version with the 8 PRs (from #244) applied as follow:


sudo -i
cd /usr/local/calibre-web-py3
git pull https://github.com/deldesir/calibre-web deldesir-search-captions --no-rebase --no-edit
git pull https://github.com/deldesir/calibre-web deldesir-patch-22 --no-rebase --no-edit
git pull https://github.com/deldesir/calibre-web deldesir-patch-23 --no-rebase --no-edit
git pull https://github.com/deldesir/calibre-web deldesir-patch-24 --no-rebase --no-edit
git pull https://github.com/deldesir/calibre-web deldesir-patch-25 --no-rebase --no-edit
git pull https://github.com/deldesir/calibre-web deldesir-patch-27 --no-rebase --no-edit
git pull https://github.com/deldesir/calibre-web deldesir-xklb-schema --no-rebase --no-edit
git pull https://github.com/deldesir/calibre-web deldesir-patch-31 --no-rebase --no-edit
iiab-update -f
rm  /library/calibre-web/xklb-metadata.db
holta commented 1 month ago

@deldesir can you tell why Ed did not face this problem, when he tested PR iiab/iiab#3837 ("Revert PR #3815: python3-cryptography no longer needed") on Ubuntu 24.04 and Raspberry Pi OS about 24h ago?

deldesir commented 1 month ago

I cannot reproduce the issue on another install (RPI OS 64bit on RPI5 https://paste.centos.org/view/de8a6c97). I am thinking I might have gotten something wrong. Will try one more time before calling it quit.

deldesir commented 2 weeks ago

Closed as subsequent tests on Ubuntu 24.04 and 24.10* could not reproduce the issue.