PlexKodiConnect icon indicating copy to clipboard operation
PlexKodiConnect copied to clipboard

TMDB 3.0.1 incompatibility (Kodi Omega)

Open f0o opened this issue 1 year ago • 4 comments

Help yourself

Describe the bug

Refreshing all fanart.tv Artwork (not just missing) yields TMDBMovieScraper error:

PLEX.utils: Error encountered:  - __init__() takes 4 positional arguments but 5 were given

To Reproduce

Steps to reproduce the behavior:

  1. Update TMDB Scraper to latest version (metadata.themoviedb.org.python-3.0.1 && metadata.tvshows.themoviedb.org.python-1.6.6 at the time of writing)
  2. Go to PKC > Artwork and fetch all fanart (not just missing)
  3. Get stacktrace:
2024-09-04 14:55:07.348 T:3976     info <general>: PLEX.sync: Start downloading additional metadata with refresh True
2024-09-04 14:55:07.350 T:5250     info <general>: PLEX.sync.metadata: Starting MetadataThread
2024-09-04 14:55:07.434 T:5250    error <general>: PLEX.utils: Error encountered:  - __init__() takes 4 positional arguments but 5 were given
2024-09-04 14:55:07.435 T:5250    error <general>: PLEX.utils: _____________________________________________________________
2024-09-04 14:55:07.436 T:5250    error <general>: PLEX.utils:     Traceback (most recent call last):
2024-09-04 14:55:07.436 T:5250    error <general>: PLEX.utils:       File "/home/osmc/.kodi/addons/plugin.video.plexkodiconnect/resources/lib/library_sync/additional_metadata.py", line 88, in run
2024-09-04 14:55:07.436 T:5250    error <general>: PLEX.utils:         self._run()
2024-09-04 14:55:07.436 T:5250    error <general>: PLEX.utils:       File "/home/osmc/.kodi/addons/plugin.video.plexkodiconnect/resources/lib/library_sync/additional_metadata.py", line 74, in _run
2024-09-04 14:55:07.437 T:5250    error <general>: PLEX.utils:         self._loop()
2024-09-04 14:55:07.437 T:5250    error <general>: PLEX.utils:       File "/home/osmc/.kodi/addons/plugin.video.plexkodiconnect/resources/lib/library_sync/additional_metadata.py", line 68, in _loop
2024-09-04 14:55:07.437 T:5250    error <general>: PLEX.utils:         self._process_in_batches(item_getter, processor, plex_type)
2024-09-04 14:55:07.437 T:5250    error <general>: PLEX.utils:       File "/home/osmc/.kodi/addons/plugin.video.plexkodiconnect/resources/lib/library_sync/additional_metadata.py", line 58, in _process_in_batches
2024-09-04 14:55:07.437 T:5250    error <general>: PLEX.utils:         processor(plex_id, plex_type, self.refresh)
2024-09-04 14:55:07.438 T:5250    error <general>: PLEX.utils:       File "/home/osmc/.kodi/addons/plugin.video.plexkodiconnect/resources/lib/library_sync/additional_metadata_tmdb.py", line 79, in process_trailers
2024-09-04 14:55:07.438 T:5250    error <general>: PLEX.utils:         trailer = get_tmdb_details(api.guids)
2024-09-04 14:55:07.438 T:5250    error <general>: PLEX.utils:       File "/home/osmc/.kodi/addons/plugin.video.plexkodiconnect/resources/lib/library_sync/additional_metadata_tmdb.py", line 41, in get_tmdb_details
2024-09-04 14:55:07.438 T:5250    error <general>: PLEX.utils:         details = get_tmdb_scraper(settings).get_details(unique_ids)
2024-09-04 14:55:07.438 T:5250    error <general>: PLEX.utils:       File "/home/osmc/.kodi/addons/plugin.video.plexkodiconnect/resources/lib/library_sync/additional_metadata_tmdb.py", line 34, in get_tmdb_scraper
2024-09-04 14:55:07.438 T:5250    error <general>: PLEX.utils:         return tmdb.TMDBMovieScraper(settings, language, certcountry, search_language)
2024-09-04 14:55:07.439 T:5250    error <general>: PLEX.utils:     TypeError: __init__() takes 4 positional arguments but 5 were given
2024-09-04 14:55:07.439 T:5250    error <general>: PLEX.utils: _____________________________________________________________

Expected behavior

Not getting a stackdump would be a start ;)

You need to attach a KODI LOG FILE!

./.

f0o avatar Sep 04 '24 15:09 f0o

Commenting out https://github.com/croneter/PlexKodiConnect/blob/python3-beta/resources/lib/library_sync/additional_metadata_tmdb.py#L33-L35 solved the issue.

f0o avatar Sep 04 '24 15:09 f0o

Sorry it took so long to get back to you 😞.

I'm confused as to which Kodi add-on you're actually using. Looking at the "official one", I do NOT see any cause for the bug you're experiencing (see https://github.com/xbmc/metadata.themoviedb.org.python/blob/8f12c4c0f2862f8b8279b81be26908d83182ce55/python/lib/tmdbscraper/tmdb.py#L4)

class TMDBMovieScraper(object):
    def __init__(self, url_settings, language, certification_country, search_language=""):

This init function indeed takes 5 arguments and should NOT break.

croneter avatar Dec 19 '24 06:12 croneter

Hi @croneter,

That's what confused me too because my local plugin does specify search_language="" as valid init parameter but it really just died with above errors :/

Sadly the addon.xml doesnt actually state on what commit the plugin is so all I get is 3.0.1 💀

f0o avatar Dec 19 '24 07:12 f0o

No worries, I'll rewire this completely and first check how many arguments TMDB accepts before calling it 😉

croneter avatar Dec 19 '24 07:12 croneter