Sonarr unable to cleanup deleted episodes

Sonarr version (exact version): 4.0.0.391-ls414
OS: Docker on Windows 10 (linuxserver/sonarr image)
Debug logs: Ubuntu Pastebin
Description of issue: Sonarr is unable to cleanup episodes from DB

I have some shows where the file has been deleted from the disk, but when Sonarr scans the show the old files are still shown as existing.

I enabled the debug logs and found that it is correctly noticing the source file is gone, but is unable to cleanup the episode from the DB.

Full debug logs attached, but the main snippet is this, where the JSON for votes seems to have a semi-colon instead of a colon, seen below:

2023-02-28 10:51:07.2|Error|MediaFileTableCleanupService|Unable to cleanup EpisodeFile in DB: 39588

[v4.0.0.391] System.Data.DataException: Error parsing column 14 (Ratings={
  "votes"; 0,
  "value": 0.0
} - String)

I’m currently on v4.0.0.391-ls414, though was on an older build until yesterday (but I hadn’t noticed the cleanup not working). Prior to that I was on v3. I didn’t perform any migrations, simply downloaded the new Docker image for v4 and re-used the old volumes.

It’s a silently corrupted DB, similar to Sonarr v4 Develop Can't Import - #4 by patrioticaction

Thanks @markus101 , I was able to use that to sort things out. I needed to remove the WHERE clause and set all Ratings to NULL, but scanning is working again now.

Thanks!

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.