Taxel / PlexTraktSync

A python script that syncs the movies, shows and ratings between trakt and Plex (without needing a PlexPass or Trakt VIP subscription)
MIT License
1.62k stars 105 forks source link

Issue after upgrading python to 3.11 #1541

Closed mwt closed 1 year ago

mwt commented 1 year ago

Confirmation

The problem

When I run plextraktsync sync, I get the following error:

Error running sync command: UserListTuple.__new__() missing 1 required positional argument: 'share_link'

Error trace / logs

INFO     PlexTraktSync [0.26.9]                
INFO     Sync Movie sections: ['Movies']       
INFO     Sync Show sections: ['TV Shows']      
ERROR    UserListTuple.__new__() missing 1     
         required positional argument:         
         'share_link'                          
         ╭─ Traceback (most recent call last)─╮
         │ /home/mwt/.local/pipx/venvs/plextr │
         │ aktsync/lib/python3.11/site-packag │
         │ es/plextraktsync/cli.py:26 in wrap │
         │                                    │
         │    23 │   │   │   cmd = getattr(mo │
         │    24 │   │   │                    │
         │    25 │   │   │   try:             │
         │ ❱  26 │   │   │   │   cmd(*args, * │
         │    27 │   │   │   except ClickExce │
         │    28 │   │   │   │   from plextra │
         │    29 │   │   │   │   logger.fatal │
         │                                    │
         │ /home/mwt/.local/pipx/venvs/plextr │
         │ aktsync/lib/python3.11/site-packag │
         │ es/plextraktsync/commands/sync.py: │
         │ 68 in sync                         │
         │                                    │
         │   65 │   │   │   w.print_plan(prin │
         │   66 │   │   if dry_run:           │
         │   67 │   │   │   logger.info("Enab │
         │ ❱ 68 │   │   runner.sync(walker=w, │
         │   69                               │
         │                                    │
         │ /home/mwt/.local/pipx/venvs/plextr │
         │ aktsync/lib/python3.11/site-packag │
         │ es/plextraktsync/sync.py:61 in     │
         │ sync                               │
         │                                    │
         │    58 │   │   │   │   logger.warni │
         │       lists won't update because i │
         │    59 │   │   │   else:            │
         │    60 │   │   │   │   for lst in s │
         │ ❱  61 │   │   │   │   │   listutil │
         │    62 │   │                        │
         │    63 │   │   if self.config.need_ │
         │    64 │   │   │   movie_trakt_ids  │
         │                                    │
         │ /home/mwt/.local/pipx/venvs/plextr │
         │ aktsync/lib/python3.11/site-packag │
         │ es/plextraktsync/trakt_list_util.p │
         │ y:95 in addList                    │
         │                                    │
         │    92 │   │   │   logger.info(f"Cr │
         │    93 │   │   │   return           │
         │    94 │   │   try:                 │
         │ ❱  95 │   │   │   self.lists.appen │
         │    96 │   │   │   logger.info(f"Do │
         │    97 │   │   except (NotFoundExce │
         │    98 │   │   │   logger.warning(  │
         │                                    │
         │ /home/mwt/.local/pipx/venvs/plextr │
         │ aktsync/lib/python3.11/site-packag │
         │ es/plextraktsync/trakt_list_util.p │
         │ y:40 in __init__                   │
         │                                    │
         │    37 │   │   self.plex_items = [] │
         │    38 │   │   self.description = N │
         │    39 │   │   if listid is not Non │
         │ ❱  40 │   │   │   userlist = LazyU │
         │    41 │   │   │   self.description │
         │    42 │   │   │   list_items = use │
         │    43 │   │   │   prelist = [      │
         │                                    │
         │ /home/mwt/.local/pipx/venvs/plextr │
         │ aktsync/lib/python3.11/site-packag │
         │ es/trakt/core.py:580 in inner      │
         │                                    │
         │   577 │   │   │   url, generator,  │
         │   578 │   │   │   json_data = self │
         │   579 │   │   │   try:             │
         │ ❱ 580 │   │   │   │   return gener │
         │   581 │   │   │   except StopItera │
         │   582 │   │   │   │   return None  │
         │   583 │   │   return inner         │
         │                                    │
         │ /home/mwt/.local/pipx/venvs/plextr │
         │ aktsync/lib/python3.11/site-packag │
         │ es/plextraktsync/trakt_list_util.p │
         │ y:29 in _get                       │
         │                                    │
         │    26 │   @get                     │
         │    27 │   def _get(cls, title, id) │
         │    28 │   │   data = yield f"lists │
         │ ❱  29 │   │   ulist = cls(creator= │
         │    30 │   │   ulist.get_items()    │
         │    31 │   │   yield ulist          │
         │    32                              │
         │                                    │
         │ /home/mwt/.local/pipx/venvs/plextr │
         │ aktsync/lib/python3.11/site-packag │
         │ es/trakt/users.py:90 in __init__   │
         │                                    │
         │    87 │   """A list created by a T │
         │    88 │                            │
         │    89 │   def __init__(self, ids=N │
         │ ❱  90 │   │   super().__init__(**k │
         │    91 │   │   self._ids = ids      │
         │    92 │   │   self._items = list() │
         │    93                              │
         │                                    │
         │ /home/mwt/.local/pipx/venvs/plextr │
         │ aktsync/lib/python3.11/site-packag │
         │ es/trakt/mixins.py:13 in __init__  │
         │                                    │
         │   10 │   """                       │
         │   11 │   class DataClassMixinClass │
         │   12 │   │   def __init__(self, ** │
         │ ❱ 13 │   │   │   self.data = data_ │
         │   14 │   │                         │
         │   15 │   │   def __getattr__(self, │
         │   16 │   │   │   return getattr(se │
         ╰────────────────────────────────────╯
         TypeError: UserListTuple.__new__()    
         missing 1 required positional         
         argument: 'share_link'

Expected behavior

A sync between Plex and trakt.

Steps to reproduce the behavior

  1. Install Debian bookworm
  2. Install pipx
  3. Use pipx to install plextraktsync
  4. Login to Plex and trakt
  5. Attempt to sync

Inspect of problematic items

No response

Workarounds

Version 0.26.0 is the most recent one that works for me. 0.25.17 also works.

Install method

pipx

Config file contents

# Config File: 
/home/mwt/.config/PlexTraktSync/config.yml
cache:
  path: 
/home/mwt/.cache/PlexTraktSync/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:
  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
  rating_priority: plex
watch:
  add_collection: false
  remove_collection: false
  scrobble_threshold: 80
  username_filter: true
  media_progressbar: true
xbmc-providers:
  movies: imdb
  shows: tvdb

Version

0.26.9

Python Version

3.11.2

Operating System and Version

Debian Bookworm

glensc commented 1 year ago

old bug. delete your cache and retry. not related to python update.