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.55k stars 101 forks source link

Can't sync liked playlists : unexpected keyword argument 'type' #941

Closed steffenbb closed 1 year ago

steffenbb commented 2 years ago

Confirmation

The problem

Hello, I'm trying to set up the python script, I've succesfully got it working with another trakt account (different computer) with my liked lists and everything. Now I've freshly installed python and the script on a different computer, but whenever I try to sync (with having liked playlists on trakt) the following happens. If I unlike them on trakt and run the script again, it succeeds.

Error trace / logs

console log: 
INFO     PlexTraktSync [0.20.x]
Sync Movie sections: [<PlexLibrarySection:movie:Concerts>, <PlexLibrarySection:movie:Documentarys>, <PlexLibrarySection:movie:Movies>]
Traceback (most recent call last):
  File "C:\Users\lulu\AppData\Local\Programs\Python\Python37\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\Users\lulu\AppData\Local\Programs\Python\Python37\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\PlexTraktSync\Lulu\plextraktsync\__main__.py", line 18, in <module>
    cli()
  File "C:\Users\lulu\AppData\Local\Programs\Python\Python37\lib\site-packages\click\core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "C:\Users\lulu\AppData\Local\Programs\Python\Python37\lib\site-packages\click\core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "C:\Users\lulu\AppData\Local\Programs\Python\Python37\lib\site-packages\click\core.py", line 1635, in invoke
    rv = super().invoke(ctx)
  File "C:\Users\lulu\AppData\Local\Programs\Python\Python37\lib\site-packages\click\core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "C:\Users\lulu\AppData\Local\Programs\Python\Python37\lib\site-packages\click\core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "C:\Users\lulu\AppData\Local\Programs\Python\Python37\lib\site-packages\click\decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "C:\PlexTraktSync\Lulu\plextraktsync\cli.py", line 46, in cli
    sync()
  File "C:\Users\lulu\AppData\Local\Programs\Python\Python37\lib\site-packages\click\core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "C:\Users\lulu\AppData\Local\Programs\Python\Python37\lib\site-packages\click\core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "C:\Users\lulu\AppData\Local\Programs\Python\Python37\lib\site-packages\click\core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "C:\Users\lulu\AppData\Local\Programs\Python\Python37\lib\site-packages\click\core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "C:\PlexTraktSync\Lulu\plextraktsync\cli.py", line 28, in wrap
    cmd(*args, **kwargs)
  File "C:\PlexTraktSync\Lulu\plextraktsync\commands\sync.py", line 60, in sync
    runner.sync(walker=w, dry_run=config.dry_run)
  File "C:\PlexTraktSync\Lulu\plextraktsync\sync.py", line 64, in sync
    listutil.addList(lst["username"], lst["listname"])
  File "C:\PlexTraktSync\Lulu\plextraktsync\trakt_list_util.py", line 88, in addList
    self.lists.append(TraktList(username, listname))
  File "C:\PlexTraktSync\Lulu\plextraktsync\trakt_list_util.py", line 47, in __init__
    for elem in LazyUserList._get(listname, username)._items
  File "C:\Users\lulu\AppData\Local\Programs\Python\Python37\lib\site-packages\trakt\core.py", line 554, in inner
    return generator.send(json_data)
  File "C:\PlexTraktSync\Lulu\plextraktsync\trakt_list_util.py", line 35, in _get
    ulist = LazyUserList(creator=creator, **data)
TypeError: __new__() got an unexpected keyword argument 'type'

plextraktsync.log:
2022-06-16 15:12:58,091 INFO[PlexTraktSync]:PlexTraktSync [0.20.x]

Expected behavior

Expect the script to go through even if there's liked scripts on trakt

Steps to reproduce the behavior

Like a list on trakt Run sync command

Inspect of problematic items

No response

Workarounds

Not having liked lists on trakt

Install method

zip download

Version

0.20.1

Python Version

3.10.5

Operating System and Version

Windows 11

steffenbb commented 2 years ago

Just updated python hence the edit, still same issue

simonc56 commented 2 years ago

There's been an update of Trakt API on 14 June 2022 adding a type value to lists :

Each list object contains a type value set to personal or official.

See official trakt changelog.

We will need to wait for a PyTrakt update to solve this.

simonc56 commented 2 years ago

The fix for this issue :

memnos commented 2 years ago

Has this been solved? Is there anyone manages to sync? I cannot.

simonc56 commented 2 years ago

We have to wait until PyTrakt maintainer get back and update its trakt module. You can go there and upvote the Maintenance issue.

ashepp commented 2 years ago

Apologies for not checking for dupe / following template. Will track this thread. I'm not clear on if there's a short term fix or whether we have to wait for the PyTraky fix? Whenever I try and run the container I'm getting the following error in the console (I reinstalled and still get the same).

Error response from daemon: Container 86b194fdf69e42e5b0fc69e1a416e037e4748d133b6591148f220e441467d416 is not running.

Log shows the same as reported previously regarding missing type.

Any suggestions?

simonc56 commented 2 years ago

For now you can disable liked_lists and watchlist sync in config file.

ashepp commented 2 years ago

I set the parameter to 'playlist_sync_to_user : false' from 'playlist_sync_to_user : all'.

The container starts and then immediately stops with the log details below. Is there another parameter I'm missing?

Thanks

simonc56 commented 2 years ago

This is off-topic, you should ask the developer of your Unraid CA container.

marksie1988 commented 2 years ago

I updated pytrakt locally as per the PR, I assume additional changes are also needed to plextraktsync for it to work?

YDeltagon commented 2 years ago

any news ?

abb0r commented 2 years ago

For now you can disable liked_lists and watchlist sync in config file.

I disabled it, but still get the error.

glensc commented 1 year ago

Anyone can try https://github.com/Taxel/PlexTraktSync/pull/1100?