Taxel / PlexTraktSync

A python script that syncs the movies, shows and ratings between trakt and Plex (without needing a PlexPass or Trakt VIP subscription)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ERROR Not Found - method exists, but no record found

raujaku opened this issue · comments

Confirmation

  • I have read the README.md on the project homepage
  • I have checked if identical issue already exists
  • I have tried downgrading to find version that can be used as a workaround

The problem

Tried running sync command, errors out.

Steps to reproduce the behavior

plextraktsync sync

Error trace / logs

ERROR    Not Found - method exists, but no record found                                                                                           
         ╭────────────────────────────────────────────────── Traceback (most recent call last) ──────────────────────────────────────────────────╮
         │ /lsiopy/lib/python3.11/site-packages/plextraktsync/cli.py:26 in wrap                                                                  │
         │                                                                                                                                       │
         │    23 │   │   │   cmd = getattr(module, name)                                                                                         │
         │    24 │   │   │                                                                                                                       │
         │    25 │   │   │   try:                                                                                                                │
         │ ❱  26 │   │   │   │   cmd(*args, **kwargs)                                                                                            │
         │    27 │   │   │   except ClickException as e:                                                                                         │
         │    28 │   │   │   │   from plextraktsync.factory import logger                                                                        │
         │    29 │   │   │   │   logger.fatal(f"Error running {name} command: {str(e)}")                                                         │
         │                                                                                                                                       │
         │ /lsiopy/lib/python3.11/site-packages/plextraktsync/commands/sync.py:68 in sync                                                        │
         │                                                                                                                                       │
         │   65 │   │   │   w.print_plan(print=logger.info)                                                                                      │
         │   66 │   │   if dry_run:                                                                                                              │
         │   67 │   │   │   logger.info("Enabled dry-run mode: not making actual changes")                                                       │
         │ ❱ 68 │   │   runner.sync(walker=w, dry_run=config.dry_run)                                                                            │
         │   69                                                                                                                                  │
         │                                                                                                                                       │
         │ /lsiopy/lib/python3.11/site-packages/plextraktsync/sync.py:69 in sync                                                                 │
         │                                                                                                                                       │
         │    66 │   │   │   │   self.sync_ratings(movie, dry_run=dry_run)                                                                       │
         │    67 │   │   │   │   self.sync_watched(movie, dry_run=dry_run)                                                                       │
         │    68 │   │   │   │   if not is_partial:                                                                                              │
         │ ❱  69 │   │   │   │   │   trakt_lists.add_to_lists(movie)                                                                             │
         │    70 │   │   │   │   │   if self.config.clear_collected:                                                                             │
         │    71 │   │   │   │   │   │   movie_trakt_ids.add(movie.trakt_id)                                                                     │
         │    72                                                                                                                                 │
         │                                                                                                                                       │
         │ /lsiopy/lib/python3.11/site-packages/plextraktsync/trakt/TraktUserListCollection.py:25 in add_to_lists                                │
         │                                                                                                                                       │
         │   22 │   │   if m.plex.edition_title is not None:                                                                                     │
         │   23 │   │   │   return                                                                                                               │
         │   24 │   │   for tl in self:                                                                                                          │
         │ ❱ 25 │   │   │   tl.add(m)                                                                                                            │
         │   26 │                                                                                                                                │
         │   27 │   def load_lists(self, liked_lists: list[TraktLikedList]):                                                                     │
         │   28 │   │   for liked_list in liked_lists:                                                                                           │
         │                                                                                                                                       │
         │ /lsiopy/lib/python3.11/site-packages/plextraktsync/trakt/TraktUserList.py:88 in add                                                   │
         │                                                                                                                                       │
         │    85 │   │   return self.plex_lists[self.name]                                                                                       │
         │    86 │                                                                                                                               │
         │    87 │   def add(self, m: Media):                                                                                                    │
         │ ❱  88 │   │   rank = self.items.get((m.media_type, m.trakt_id))                                                                       │
         │    89 │   │   if rank is None:                                                                                                        │
         │    90 │   │   │   # Item is not in this trakt list                                                                                    │
         │    91 │   │   │   return                                                                                                              │
         │                                                                                                                                       │
         │ /lsiopy/lib/python3.11/site-packages/plextraktsync/trakt/TraktUserList.py:46 in items                                                 │
         │                                                                                                                                       │
         │    43 │   @property                                                                                                                   │
         │    44 │   def items(self):                                                                                                            │
         │    45 │   │   if not self._items:                                                                                                     │
         │ ❱  46 │   │   │   self.description, self._items = self.load_items()                                                                   │
         │    47 │   │   return self._items                                                                                                      │
         │    48 │                                                                                                                               │
         │    49 │   def load_items(self):                                                                                                       │
         │                                                                                                                                       │
         │ /lsiopy/lib/python3.11/site-packages/plextraktsync/trakt/TraktUserList.py:52 in load_items                                            │
         │                                                                                                                                       │
         │    49 │   def load_items(self):                                                                                                       │
         │    50 │   │   from plextraktsync.trakt_list_util import LazyUserList                                                                  │
         │    51 │   │                                                                                                                           │
         │ ❱  52 │   │   userlist = LazyUserList._get(self.name, self.trakt_id)                                                                  │
         │    53 │   │   list_items = userlist._items                                                                                            │
         │    54 │   │   prelist = [                                                                                                             │
         │    55 │   │   │   (elem[0], elem[1])                                                                                                  │
         │                                                                                                                                       │
         │ /lsiopy/lib/python3.11/site-packages/trakt/core.py:578 in inner                                                                       │
         │                                                                                                                                       │
         │   575 │   │   │   │   # Handle cached property responses                                                                              │
         │   576 │   │   │   │   return resp                                                                                                     │
         │   577 │   │   │   url, generator, _ = resp                                                                                            │
         │ ❱ 578 │   │   │   json_data = self._handle_request('get', url)                                                                        │
         │   579 │   │   │   try:                                                                                                                │
         │   580 │   │   │   │   return generator.send(json_data)                                                                                │
         │   581 │   │   │   except StopIteration:                                                                                               │
         │                                                                                                                                       │
         │ /lsiopy/lib/python3.11/site-packages/trakt/core.py:550 in _handle_request                                                             │
         │                                                                                                                                       │
         │   547 │   │   │   │   │   │   │   │   │      data=json.dumps(data))                                                                   │
         │   548 │   │   self.logger.debug('RESPONSE [%s] (%s): %s', method, url, str(response))                                                 │
         │   549 │   │   if response.status_code in self.error_map:                                                                              │
         │ ❱ 550 │   │   │   raise self.error_map[response.status_code](response)                                                                │
         │   551 │   │   elif response.status_code == 204:  # HTTP no content                                                                    │
         │   552 │   │   │   return None                                                                                                         │
         │   553

Expected behavior

plex to sync to trakt.

Inspect of problematic items

plextraktsync inspect ID
PlexTraktSync [0.28.12]
ERROR    Unable to create PlexId: ID                                                                                                              
         ╭────────────────────────────────────────────────── Traceback (most recent call last) ──────────────────────────────────────────────────╮
         │ /lsiopy/lib/python3.11/site-packages/plextraktsync/cli.py:26 in wrap                                                                  │
         │                                                                                                                                       │
         │    23 │   │   │   cmd = getattr(module, name)                                                                                         │
         │    24 │   │   │                                                                                                                       │
         │    25 │   │   │   try:                                                                                                                │
         │ ❱  26 │   │   │   │   cmd(*args, **kwargs)                                                                                            │
         │    27 │   │   │   except ClickException as e:                                                                                         │
         │    28 │   │   │   │   from plextraktsync.factory import logger                                                                        │
         │    29 │   │   │   │   logger.fatal(f"Error running {name} command: {str(e)}")                                                         │
         │                                                                                                                                       │
         │ /lsiopy/lib/python3.11/site-packages/plextraktsync/commands/inspect.py:107 in inspect                                                 │
         │                                                                                                                                       │
         │   104 │   print = factory.print                                                                                                       │
         │   105 │   print(f"PlexTraktSync [{factory.version.full_version}]")                                                                    │
         │   106 │                                                                                                                               │
         │ ❱ 107 │   for plex_id in expand_plexid(inputs):                                                                                       │
         │   108 │   │   inspect_media(plex_id)                                                                                                  │
         │   109                                                                                                                                 │
         │                                                                                                                                       │
         │ /lsiopy/lib/python3.11/site-packages/plextraktsync/util/expand_id.py:39 in expand_plexid                                              │
         │                                                                                                                                       │
         │   36 │   from plextraktsync.plex.PlexIdFactory import PlexIdFactory                                                                   │
         │   37 │                                                                                                                                │
         │   38 │   for id in input:                                                                                                             │
         │ ❱ 39 │   │   yield PlexIdFactory.create(id)                                                                                           │
         │   40                                                                                                                                  │
         │   41                                                                                                                                  │
         │   42 def expand_id(input):                                                                                                            │
         │                                                                                                                                       │
         │ /lsiopy/lib/python3.11/site-packages/plextraktsync/plex/PlexIdFactory.py:18 in create                                                 │
         │                                                                                                                                       │
         │   15 │   │   elif key.startswith("plex://"):                                                                                          │
         │   16 │   │   │   return cls.from_plex_guid(key)                                                                                       │
         │   17 │   │                                                                                                                            │
         │ ❱ 18 │   │   raise RuntimeError(f"Unable to create PlexId: {key}")                                                                    │
         │   19 │                                                                                                                                │
         │   20 │   @classmethod                                                                                                                 │
         │   21 │   def from_plex_guid(cls, id):                                                                                                 │
         ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
         RuntimeError: Unable to create PlexId: ID                                                                                                
Error: Error running inspect command: Unable to create PlexId: ID

Workarounds

No response

Install method

Unraid installation (not supported)

Config file contents

cache:
  path: /config/trakt_cache
excluded-libraries:
- Private
- Family Holidays
config:
  dotenv_override: true
plex:
  timeout: 30
logging:
  append: true
  console_time: false
  debug: false
  filename: plextraktsync.log
  filter_loggers: null
  filter: null
sync:
  rating_priority: plex
  plex_to_trakt:
    collection: true
    clear_collected: false
    ratings: true
    watched_status: true
    watchlist: true
  trakt_to_plex:
    liked_lists: true
    ratings: true
    watched_status: true
    watchlist: true
    watchlist_as_playlist: false
watch:
  add_collection: false
  remove_collection: false
  scrobble_threshold: 80
  username_filter: true
  media_progressbar: true
xbmc-providers:
  movies: imdb
  shows: tvdb

Version

0.28.12

Python Version

3.11.6

Plex Server Version

1.32.8.7639-fb6452ebf

Operating System and Version

Linux-6.1.64-Unraid-x86_64-with

I was not aware that the config file was supposed to be edited.

Inspect command takes value you have problem with: