FIXED!
Ok. I was focusing on one show, thinking that was the one with a bad imdbnumber.
I did a “VideoLibrary.GetTVShows” API call that returned all imdbnumbers and found that there were 2 shows that had non-integer (“tt…”) numbers. It wasn’t one of the shows I was importing episodes to, but I guess Sonarr gets the whole list and looks for the correct imdbnumber within that list and that was making it barf on the non-integer.
For future people trying to fix: Do a call like this:
{"jsonrpc": "2.0", "method": "VideoLibrary.GetTVShows", "params": { "properties": ["imdbnumber"], "sort": { "order": "ascending", "method": "label" } }, "id": "libTvShows"}
Then look at your imdbnumbers (use a web-based JSON parser to make it easier to read). You can try searching for "tt (a quote mark followed by tt - i found that easier than visually scanning…). This’ll help you find the shows that are causing trouble.
I found the individual NFO files that my Kodi export (library export to individual files) created for the offending shows and replaced the bad “tt…” numbers with the correct TVDB IDs. Then I removed the shows and re-imported them and it appears that all is well.
Thanks for the help, markus101!