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

sync throws missing argument error

marksie1988 opened this issue · comments

Confirmation

  • I have read the README.md on the project homepage
  • I have checked if identical issue already exists

The problem

When running plextraktsync sync the error below is displayed

TypeError: <lambda>() missing 1 required positional argument: 'type'

Error trace / logs

INFO     PlexTraktSync [0.23.3]
INFO     Sync Movie sections: [<PlexLibrarySection:movie:Films>]
INFO     Sync Show sections: [<PlexLibrarySection:show:TV programmes>]
INFO     Downloaded List Fast and Furious Chronology
INFO     Downloaded List The Matrix Franchise
INFO     Downloaded List The Bourne Identity Series
Traceback (most recent call last):
  File "/root/.local/bin/plextraktsync", line 8, in <module>
    sys.exit(cli())
  File "/root/.local/pipx/venvs/plextraktsync/lib/python3.9/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/root/.local/pipx/venvs/plextraktsync/lib/python3.9/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/root/.local/pipx/venvs/plextraktsync/lib/python3.9/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/root/.local/pipx/venvs/plextraktsync/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/root/.local/pipx/venvs/plextraktsync/lib/python3.9/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/root/.local/pipx/venvs/plextraktsync/lib/python3.9/site-packages/plextraktsync/cli.py", line 28, in wrap
    cmd(*args, **kwargs)
  File "/root/.local/pipx/venvs/plextraktsync/lib/python3.9/site-packages/plextraktsync/commands/sync.py", line 57, in sync
    runner.sync(walker=w, dry_run=config.dry_run)
  File "/root/.local/pipx/venvs/plextraktsync/lib/python3.9/site-packages/plextraktsync/sync.py", line 83, in sync
    listutil.addList(lst["username"], lst["listname"])
  File "/root/.local/pipx/venvs/plextraktsync/lib/python3.9/site-packages/plextraktsync/trakt_list_util.py", line 88, in addList
    self.lists.append(TraktList(username, listname))
  File "/root/.local/pipx/venvs/plextraktsync/lib/python3.9/site-packages/plextraktsync/trakt_list_util.py", line 47, in __init__
    for elem in LazyUserList._get(listname, username)._items
  File "/root/.local/pipx/venvs/plextraktsync/lib/python3.9/site-packages/trakt/core.py", line 561, in inner
    return generator.send(json_data)
  File "/root/.local/pipx/venvs/plextraktsync/lib/python3.9/site-packages/plextraktsync/trakt_list_util.py", line 35, in _get
    ulist = LazyUserList(creator=creator, **data)
TypeError: <lambda>() missing 1 required positional argument: 'type'

Expected behavior

Sync should complete without error

Steps to reproduce the behavior

  1. run plextraktsync sync

Inspect of problematic items

No response

Workarounds

No response

Install method

pipx (Recommended)

Version

0.23.3

Python Version

3.9.2

Operating System and Version

Debian 11 (bullseye)

@twolaw, so the query lacks type parameter:

what value to add to data before the constructor there?

@marksie1988 off topic, but you probably should not run this app as root user!

@marksie1988 off topic, but you probably should not run this app as root user!

Yes this is just a temporary server as I'm rebuilding all mine with ansible soon.

Does plextraktsync self-update also update dependences ?
@marksie1988 be sure you have trakt version 3.4.7

@twolaw yes, it installs new venv. here problem is different, data does not have the type, previously problem was that the class did not support type parameter.

Trakt lists are cached, try to remove cache file trakt_cache.sqlite

Readme states :

After that, movie details and Trakt lists are cached, so it should run a lot quicker the second time. This does mean, however, that Trakt lists are not updated dynamically (which is fine for lists like "2018 Academy Award Nominees" but might not be ideal for lists that are updated often).

Seems removing the cache fixed this👍 thanks for the help guys.

Maybe worth adding something to the self-update that clears caches?

self-update and cache have nothing to do with each other.

Well they do really, if an update causes the cache to no longer be valid and raise and error as it did for me... Then the cache should be cleared.

If the update had cleared the cache in this scenario I would have seen no error and would have saved any troubleshooting.

No, they don't. The update to structures was from trakt.tv site.