Sync command error on 0.31.0
AndreiArdelean1 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
Sync command error on 0.31.0
Steps to reproduce the behavior
plextraktsync sync command throws the error:
Error trace / logs
ERROR 'liked_list'
╭───────────────── Traceback (most recent call last) ─────────────────╮
│ /app/plextraktsync/cli.py:26 in wrap │
│ │
│ 23 │ │ │ cmd = getattr(module, name) │
│ 24 │ │ │ │
│ 25 │ │ │ try: │
│ ❱ 26 │ │ │ │ cmd(*args, **kwargs) │
│ 27 │ │ │ except EOFError as e: │
│ 28 │ │ │ │ raise ClickException( │
│ 29 │ │ │ │ │ f"Program requested terminal, No terminal │
│ │
│ /app/plextraktsync/commands/sync.py:75 in sync │
│ │
│ 72 │ │ return │
│ 73 │ │
│ 74 │ with measure_time("Completed full sync"): │
│ ❱ 75 │ │ runner = factory.sync │
│ 76 │ │ if runner.config.need_library_walk: │
│ 77 │ │ │ w.print_plan(print=logger.info) │
│ 78 │ │ if dry_run: │
│ │
│ /usr/local/lib/python3.12/functools.py:995 in __get__ │
│ │
│ 992 │ │ │ raise TypeError(msg) from None │
│ 993 │ │ val = cache.get(self.attrname, _NOT_FOUND) │
│ 994 │ │ if val is _NOT_FOUND: │
│ ❱ 995 │ │ │ val = self.func(instance) │
│ 996 │ │ │ try: │
│ 997 │ │ │ │ cache[self.attrname] = val │
│ 998 │ │ │ except TypeError: │
│ │
│ /app/plextraktsync/util/Factory.py:143 in sync │
│ │
│ 140 │ │ plex = self.plex_api │
│ 141 │ │ trakt = self.trakt_api │
│ 142 │ │ │
│ ❱ 143 │ │ return Sync(self.sync_config, plex, trakt) │
│ 144 │ │
│ 145 │ @cached_property │
│ 146 │ def progressbar(self): │
│ │
│ /app/plextraktsync/util/Factory.py:301 in sync_config │
│ │
│ 298 │ def sync_config(self): │
│ 299 │ │ from plextraktsync.config.SyncConfig import SyncConfi │
│ 300 │ │ │
│ ❱ 301 │ │ return SyncConfig(self.config, self.server_config) │
│ 302 │ │
Error: Error running sync command: 'liked_list'
│ 303 │ @cached_property │
│ 304 │ def queue(self): │
│ │
│ /app/plextraktsync/config/SyncConfig.py:19 in __init__ │
│ │
│ 16 │ def __init__(self, config: Config, server_config: PlexSer │
│ 17 │ │ self.config = dict(config["sync"]) │
│ 18 │ │ self.liked_lists = config["liked_lists"] │
│ ❱ 19 │ │ self.liked_lists_overrides = config["liked_list"] or │
│ 20 │ │ self.server_config = server_config.sync_config │
│ 21 │ │
│ 22 │ def __getitem__(self, key): │
│ │
│ /app/plextraktsync/config/Config.py:54 in __getitem__ │
│ │
│ 51 │ def __getitem__(self, item): │
│ 52 │ │ if not self.initialized: │
│ 53 │ │ │ self.initialize() │
│ ❱ 54 │ │ return dict.__getitem__(self, item) │
│ 55 │ │
│ 56 │ def __contains__(self, item): │
│ 57 │ │ if not self.initialized: │
╰─────────────────────────────────────────────────────────────────────╯
KeyError: 'liked_list'
Expected behavior
No error should occur
Workarounds
run container with image ghcr.io/taxel/plextraktsync:0.30.11
Config file contents
# Config File: /app/config/config.yml
cache:
path: /app/cache/trakt_cache
excluded-libraries:
- Personal
config:
dotenv_override: true
plex:
timeout: 30
logging:
append: false
console_time: false
debug: false
filename: plextraktsync.log
filter_loggers: null
filter: null
sync:
rating_priority: plex
plex_to_trakt:
collection: false
clear_collected: false
ratings: false
watched_status: true
watchlist: false
trakt_to_plex:
liked_lists: false
ratings: false
watched_status: true
watchlist: false
watchlist_as_playlist: false
watch:
add_collection: false
remove_collection: false
scrobble_threshold: 80
username_filter: true
media_progressbar: true
xbmc-providers:
movies: imdb
Install method
docker-compose
Version
0.31.0
Python Version
3.12.4 (main, Jun 7 2024, 20:08:32) [GCC 13.2.1 20231014]
Plex Server Version
1.40.3.8555-fef15d30c, updated at: 2024-06-13 17:30:58
Operating System and Version
Ubuntu 22.04.4 LTS
I got this too, and was able to run on 0.31.0 by adding a top-level key named liked_list
with a blank object as the value in my config.
liked_list: {}
Same error here.
WARNING plextraktsync without command is deprecated. Executing "plextraktsync
sync"
INFO PlexTraktSync [0.31.0]
INFO Connecting with url:
<url>,
timeout 30 seconds
ERROR 'liked_list'
╭───────────────── Traceback (most recent call last) ─────────────────╮
│ /app/plextraktsync/cli.py:26 in wrap │
│ │
│ 23 │ │ │ cmd = getattr(module, name) │
│ 24 │ │ │ │
│ 25 │ │ │ try: │
│ ❱ 26 │ │ │ │ cmd(*args, **kwargs) │
│ 27 │ │ │ except EOFError as e: │
│ 28 │ │ │ │ raise ClickException( │
│ 29 │ │ │ │ │ f"Program requested terminal, No terminal │
│ │
│ /app/plextraktsync/commands/sync.py:75 in sync │
│ │
│ 72 │ │ return │
│ 73 │ │
│ 74 │ with measure_time("Completed full sync"): │
│ ❱ 75 │ │ runner = factory.sync │
│ 76 │ │ if runner.config.need_library_walk: │
│ 77 │ │ │ w.print_plan(print=logger.info) │
│ 78 │ │ if dry_run: │
│ │
│ /usr/local/lib/python3.12/functools.py:995 in __get__ │
│ │
│ 992 │ │ │ raise TypeError(msg) from None │
│ 993 │ │ val = cache.get(self.attrname, _NOT_FOUND) │
│ 994 │ │ if val is _NOT_FOUND: │
│ ❱ 995 │ │ │ val = self.func(instance) │
│ 996 │ │ │ try: │
│ 997 │ │ │ │ cache[self.attrname] = val │
│ 998 │ │ │ except TypeError: │
│ │
│ /app/plextraktsync/util/Factory.py:143 in sync │
│ │
│ 140 │ │ plex = self.plex_api │
│ 141 │ │ trakt = self.trakt_api │
│ 142 │ │ │
│ ❱ 143 │ │ return Sync(self.sync_config, plex, trakt) │
│ 144 │ │
│ 145 │ @cached_property │
│ 146 │ def progressbar(self): │
│ │
│ /app/plextraktsync/util/Factory.py:301 in sync_config │
│ │
│ 298 │ def sync_config(self): │
│ 299 │ │ from plextraktsync.config.SyncConfig import SyncConfi │
│ 300 │ │ │
│ ❱ 301 │ │ return SyncConfig(self.config, self.server_config) │
│ 302 │ │
│ 303 │ @cached_property │
│ 304 │ def queue(self): │
│ │
│ /app/plextraktsync/config/SyncConfig.py:19 in __init__ │
│ │
│ 16 │ def __init__(self, config: Config, server_config: PlexSer │
│ 17 │ │ self.config = dict(config["sync"]) │
│ 18 │ │ self.liked_lists = config["liked_lists"] │
│ ❱ 19 │ │ self.liked_lists_overrides = config["liked_list"] or │
│ 20 │ │ self.server_config = server_config.sync_config │
│ 21 │ │
│ 22 │ def __getitem__(self, key): │
│ │
│ /app/plextraktsync/config/Config.py:54 in __getitem__ │
│ │
│ 51 │ def __getitem__(self, item): │
│ 52 │ │ if not self.initialized: │
│ 53 │ │ │ self.initialize() │
│ ❱ 54 │ │ return dict.__getitem__(self, item) │
│ 55 │ │
│ 56 │ def __contains__(self, item): │
│ 57 │ │ if not self.initialized: │
╰─────────────────────────────────────────────────────────────────────╯
KeyError: 'liked_list'
Error: Error running sync command: 'liked_list'
** Press ANY KEY to close this window **
I got this too, and was able to run on 0.31.0 by adding a top-level key named
liked_list
with a blank object as the value in my config.liked_list: {}
Thanks this worked. :)
I got this too, and was able to run on 0.31.0 by adding a top-level key named
liked_list
with a blank object as the value in my config.liked_list: {}
in which file did you add this? can you provide an example. or if its the correct solution, raise a PR with it?
I got this too, and was able to run on 0.31.0 by adding a top-level key named
liked_list
with a blank object as the value in my config.liked_list: {}in which file did you add this? can you provide an example. or if its the correct solution, raise a PR with it?
Just in my config.yml
. It's also been added to the default config file in the repo, but is currently commented out.
I don't know enough to fix the issue, but it looks like it was introduced in #1832.
I got this too, and was able to run on 0.31.0 by adding a top-level key named
liked_list
with a blank object as the value in my config.liked_list: {}
This worked for me as well. I appreciate you commenting here with this.
I got this too, and was able to run on 0.31.0 by adding a top-level key named
liked_list
with a blank object as the value in my config.liked_list: {}in which file did you add this? can you provide an example. or if its the correct solution, raise a PR with it?
Just in my
config.yml
. It's also been added to the default config file in the repo, but is currently commented out.I don't know enough to fix the issue, but it looks like it was introduced in #1832.
I change my config.xml for this
But not works for me. It´s neccessary something more? Thanks.