*** Unhandled exception detected: <class 'KeyError'> 'season_number' ***

I was watching a TV show and a msg about TVDB popped up telling me to check the log. Never had this happen before. Here’s the log:


Are you using nfo files? Does the problem go away if you context menu on “The Rookie” top level item, select info>refresh>no to all episodes>yes to ignore local and grab from the internet.


I can try that but I haven’t gotten the popup since.

You really need to include a full log. I maintain that scraper for the Kodi team, but the thing I need to know is what the scraper was doing right before the error. You cut off the part in the beginning that would have told me that.

1 Like

Here’s everything that came before it:


And here is the full log:


That’s not a full log. The full log would include the information from the time you started Kodi/OSMC until the present (loading all the addons, etc). This is still just a log snippet with a random start point, and not a start point that helps at all.

I can only provide what is there. I had just rebooted and cleared the log at the time (I was investigating something else that ended up being my Internet connection). I then went back to watching TV shows and within minutes of starting one I got the popup.


We don’t know:

  • add-on version
  • python-version
  • osmc release
  • kodi-version

Can you at least post a full log even if it isn’t during reproduction of the error so we can get more of an insight in to the environment?


By full log do you mean with debugging on? I didn’t have that one when I got the popup.

If you’re not having a problem now and things work as expected, then there’s no need for any logs.

Otherwise please upload some logs – it will let us check a few things as suggested above.



I haven’t had the issue since. I only posted about it because it seemed like a serious issue (why interrupt show watching with a popup if not?). If it happens again I’ll upload more logs.

Can you please upload a log as requested?



For some reason the TV show scraper was triggered to run, and it will run in the background even if a show is being watched. So the error you saw wasn’t about the show you were watching, but something the scraper was trying to do. I can see from the log snippet that the scraper threw the error, but I can’t for the life of me figure out how the system would ever get into a state that that particular error would ever happen. So it certainly could have been a weird fluke that won’t repeat, but who knows for sure.