This one is a doozy, so buckle up. I've been dealing with the problem for several months now. It is extremely inconsistent and has so far been impossible to track down. There is a similar thread to this here: #1277346956041257074 - but none of the info in that has helped me.
When the issue first started happening, nothing changed. I had Kometa running since the PMM days with a config that worked well. I went to bed one night, and then woke up one morning to find the issue. I ran it again manually, assuming it was some weird hiccup, and it seemed to run okay, so I left it. But over the weeks it started to happen more and more. But each time it seemed to be happening in a completely different place in the kometa process, and it wasn't always a not 'Movie' complaint, it was sometimes things like not 'Show' or other variations of that.
The past few weeks it's been unbearable. Kometa is barely working and I get the error every single day. I've tried using the DBRepair script by ChuckPA - it found zero problems with the database. But I ran the reindexing, vacuuming, etc anyway. Still have the issue. Tried doing the manual method the script is based on using Plex SQLite, same results. I made a copy of the database and combed through EVERY table to see if I could spot malformed tables or items, nothing really stood out.
Cut to today/yesterday. I've spent a lot of time trying to track down this issue, but to no avail. So my only choice left was to nuke Plex and rebuild it from scratch. Even after doing that, I looked through a copy of the database again, and this time was brutal with trimming any media content that had anything that looked even remotely out-of-place (even if it was still valid and working in Plex itself) Note: I didn't edit the database itself, I just used the database to look for weird metadata entries and then removed the related media files in Plex.
Test Set 2: Kometa Local install on different PC running Windows. || This worked completely fine across all tests.