Bug in TVShows data scraper...

  • I've tried to resolve this myself, but I am not familiar enough with the code to offer a solution. I'm posting here in the hope a Dev might see it and snag the bug, or know where to send the info...


    Scraping this specific show:

    https://www.themoviedb.org/tv/121-doctor-who/season/10/episode/5?language=en-GB


    Causes Kodi to abort scanning with this error in the log every time...

    2024-06-12 05:22:16.650 T:28816   error <general>: [metadata.tvshows.themoviedb.org.python (1.6.6)]: *** Unhandled exception detected: <class 'KeyError'> 'credits' ***
    2024-06-12 05:22:16.650 T:28816   error <general>: [metadata.tvshows.themoviedb.org.python (1.6.6)]: *** Start diagnostic info ***
    2024-06-12 05:22:16.736 T:28816   error <general>: [metadata.tvshows.themoviedb.org.python (1.6.6)]: System info: uname_result(system='Windows', node='BAThinkPad1', release='10', version='10.0.22621', machine='AMD64', processor='Intel64 Family 6 Model 142 Stepping 9, GenuineIntel')
    2024-06-12 05:22:16.737 T:28816   error <general>: [metadata.tvshows.themoviedb.org.python (1.6.6)]: OS info: Busy
    2024-06-12 05:22:16.737 T:28816   error <general>: [metadata.tvshows.themoviedb.org.python (1.6.6)]: Kodi version: 21.0 (21.0.0) Git:20240406-60c4500054
    2024-06-12 05:22:16.737 T:28816   error <general>: [metadata.tvshows.themoviedb.org.python (1.6.6)]: File: C:\Users\admin\AppData\Roaming\Kodi\addons\metadata.tvshows.themoviedb.org.python\libs\data_utils.py
    2024-06-12 05:22:16.737 T:28816   error <general>: [metadata.tvshows.themoviedb.org.python (1.6.6)]: Code context:
                                                        337:             vtag.addVideoStream(videostream)
                                                        338:         _set_cast(
                                                        339:>            episode_info['season_cast'] + episode_info['credits']['guest_stars'], vtag)
                                                        340:         ext_ids = {'tmdb_id': episode_info['id']}
                                                        341:         ext_ids.update(episode_info.get('external_ids', {}))
                                                      
    <snip> Variable dump removed due to forum limitations: The message is too long, must be under 30,000 characters.

  • Please provide a full debug log.

    How to post a log (wiki)

    1. Enable debugging in Settings>System Settings>Logging
    2. Restart Kodi
    3. Replicate the problem
    4. Generate a log URL (do not post/upload logs to the forum)

    use "Settings > LibreELEC > System > Paste system logs" or run "pastekodi" over SSH, then post the URL link