#1087270 lollypop: small trouble with its main SQLite database?

#1087270#5
Date:
2024-11-10 13:23:54 UTC
From:
To:
Hi,

Today, lollypop refuse to start with the following error:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/lollypop/application.py", line
193, in do_startup
    self.init()
  File "/usr/lib/python3/dist-packages/lollypop/application.py", line
144, in init
    self.db = Database()
              ^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/lollypop/database.py", line
161, in __init__
    upgrade.upgrade(self)
  File "/usr/lib/python3/dist-packages/lollypop/database_upgrade.py",
line 49, in upgrade
    result = sql.execute("PRAGMA user_version")
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sqlite3.DatabaseError: file is not a database

Last time it worked was on 6th Nov and here is the content of
~/.local/share/lollypop:

~/.l/s/lollypop> ls -alit
total 1180
47610377 drwx------ 77 patrice patrice    4096 10 nov.  13:57 ../
47714046 drwxr-xr-x  5 patrice patrice    4096  6 nov.  19:47 ./
47714047 -rw-r--r--  1 patrice patrice   12288  6 nov.  19:47 playlists.db
47714304 -rw-r--r--  1 patrice patrice 1138688  6 nov.  19:47 lollypop.db
47714308 -rw-r--r--  1 patrice patrice       5  6 nov.  19:47 LASTFM_queue.bin
47714316 -rw-r--r--  1 patrice patrice       5  6 nov.  19:47
listenbrainz_queue.bin
47714305 -rw-r--r--  1 patrice patrice      19  6 nov.  19:47 today.bin
47714048 drwxr-xr-x  2 patrice patrice   20480 26 févr.  2024 artists/
47714309 -rw-r--r--  1 patrice patrice    8192  1 nov.   2023 history.db
47714310 drwxr-xr-x  2 patrice patrice    4096 23 avril  2023 albums/
47714306 drwxr-xr-x  2 patrice patrice    4096 13 mars   2022 albums_web/

But regarding all the *.db files here what the file command says:

~/.l/s/lollypop> file *.db
history.db:   SQLite 3.x database, last written using SQLite version
3043002, file counter 18, database pages 2, cookie 0x1, schema 4,
UTF-8, version-valid-for 18
lollypop.db:  data
playlists.db: SQLite 3.x database, user version 5, last written using
SQLite version 3046001, file counter 237, database pages 3, cookie
0xec, schema 4, UTF-8, version-valid-for 237

The lollypop.db seems not be recognized as a SQLite 3.x database any more.
I did not remember any issue with my desktop session since.
Could this be the effect of some recent library upgrades?
In the python stack? (last  libsqlite3-0 update was in 2024-08-14)

Thanks,
Patrice

#1087270#10
Date:
2024-11-10 17:07:42 UTC
From:
To:
---------------------------- 8< ----------------------------

Hmmm, that's really weird - I don't see these problems on my system,
and I have an unstable which I update pretty much all the time.

If you find no way to start lollypop, I would probably try to simply
remove the database (the lollypop .db file) - as you probably know this
is just a database for Lollypop, and it doesn't include the actual
music, which is in files of their own, so it should be safe to remove
it, and then regenerate it.

/Andreas
gusnan@debian.org

#1087270#15
Date:
2024-11-10 17:24:38 UTC
From:
To:
Le dim. 10 nov. 2024 à 18:07, Andreas Rönnquist <gusnan@debian.org> a écrit :

Yes, I was surprised because it had been a while since I had a problem.
Feel free to close this issue if you think it's not that common or
useful for investigation.

Already done while keeping the broken database just in case.

Many thanks,
Patrice

~/.l/s/lollypop> ls -l lollypop.db*
-rw-r--r-- 1 patrice patrice 1150976 10 nov.  18:22 lollypop.db
-rw-r--r-- 1 patrice patrice 1138688  6 nov.  19:47 lollypop.db.broken
~/.l/s/lollypop> file lollypop.db*
lollypop.db:        SQLite 3.x database, user version 48, last written
using SQLite version 3046001, file counter 352, database pages 281,
cookie 0xe, schema 4, UTF-8, version-valid-for 352
lollypop.db.broken: data