I manually delete the empty albums in the database by first searching for them like this: select count(*) from albums left join items on items.album_id = albums.id WHERE items.id IS NULL
Then there is always 1 which is empty after this error.
Then i delete them by running this command: delete from albums where id IN (select albums.id from albums left join items on items.album_id = albums.id WHERE items.id IS NULL)
–
After that, I run it again, and the error shows up again… Quite draining to be honest
As someone on Reddit stated, your database seems to be damaged. Unless you have an idea how that happened, what exactly is wrong about the database and how to undo it, I can’t think of a reliable way to restore the database to a consistent state. If you can, restore from a working backup or rebuild the database, as also suggested on Reddit. Manually modifying some of the Sqlite tables is probably a good way to bring the database into an inconsistent state in the first place.
Here are some things to try:
disable plugins (not just fetchart or any other single plugin), in particular the non-official plugins. The traceback posted on reddit probably is an issue with a plugin (can’t tell which, though, see the next point.) That is not necessarily the underlying problem, though.
run beets in verbose mode (-v), see whether it gives any further clues.
try to reproduce on a new database: If you manage to do so, we’d have an actual starting point to debug the issue
Next time, please don’t scatter the information about your problem across three external websites, and don’t screenshot error messages but copy the text.