Kometa-Team / Kometa

Python script to update metadata information for items in plex as well as automatically build collections and playlists. The Wiki Documentation is linked below.
https://kometa.wiki
MIT License
2.5k stars 306 forks source link

YAML Error: argument of type 'bool' is not iterable #452

Closed domenicdistefano closed 2 years ago

domenicdistefano commented 2 years ago

Using the Docker Walkthrough and at the point where I run this command - _docker run -it -v "/Users/mroche/plex-meta-manager:/config:rw" meisnate12/plex-meta-manager --run

Screen output below plus full log file below that. Any ideas?


Version: 1.12.2-develop1115 | |====================================================================================================| | Starting Run | |====================================================================================================| | Locating config... | | Using //config/config.yml as config | | YAML Error: argument of type 'bool' is not iterable


[2021-11-25 05:02:27,643] [util.py:197] [INFO] ==================================================================================================== [2021-11-25 05:02:27,644] [plex_meta_manager.py:122] [INFO] [2021-11-25 05:02:27,645] [plex_meta_manager.py:123] [INFO] _ _ __ [2021-11-25 05:02:27,646] [plex_meta_manager.py:124] [INFO] _ \ ___ \/ ___ _ _ \/ _ _ [2021-11-25 05:02:27,646] [plex_meta_manager.py:125] [INFO] _) / _ \ \/ / \/ / _ \ _/ ` \/ / _` ' \ / ` / _` / _ \ '__ [2021-11-25 05:02:27,647] [plex_meta_manager.py:126] [INFO] __/ __/> < __/ (_ (_ (_ (_ __/ [2021-11-25 05:02:27,648] [plex_meta_manager.py:127] [INFO] _ _ __//_\ _ _ ___ __,_ _ _ _, _ _ _, __, ___ _ [2021-11-25 05:02:27,648] [plex_meta_manager.py:128] [INFO] ___/ [2021-11-25 05:02:27,649] [plex_meta_manager.py:129] [INFO] Version: 1.12.2-develop1115 [2021-11-25 05:02:27,650] [util.py:197] [INFO] ==================================================================================================== [2021-11-25 05:02:27,650] [util.py:201] [INFO] Starting Run [2021-11-25 05:02:27,651] [util.py:205] [INFO] ==================================================================================================== [2021-11-25 05:02:27,652] [config.py:35] [INFO] Locating config... [2021-11-25 05:02:27,653] [config.py:41] [INFO] Using //config/config.yml as config [2021-11-25 05:02:27,692] [util.py:150] [DEBUG] Traceback (most recent call last): File "/modules/config.py", line 79, in init if new_config["libraries"][library] and "plex" in new_config["libraries"][library]: TypeError: argument of type 'bool' is not iterable
[2021-11-25 05:02:27,696] [util.py:150] [DEBUG] Traceback (most recent call last):
File "/modules/config.py", line 79, in init
if new_config["libraries"][library] and "plex" in new_config["libraries"][library]:
TypeError: argument of type 'bool' is not iterable
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "//plex_meta_manager.py", line 143, in start
config = Config(default_dir, attrs)
File "/modules/config.py", line 105, in init
raise Failed(f"YAML Error: {e}")
modules.util.Failed: YAML Error: argument of type 'bool' is not iterable
[2021-11-25 05:02:27,705] [util.py:146] [CRITICAL] YAML Error: argument of type 'bool' is not iterable
[2021-11-25 05:02:27,705] [plex_meta_manager.py:154] [INFO]
[2021-11-25 05:02:27,706] [util.py:197] [INFO] ====================================================================================================
[2021-11-25 05:02:27,707] [util.py:201] [INFO] Finished Run
[2021-11-25 05:02:27,707] [util.py:201] [INFO] Run Time: 0:00:00
[2021-11-25 05:02:27,708] [util.py:205] [INFO] ====================================================================================================
meisnate12 commented 2 years ago

can you share your config file just remove any keys and urls

domenicdistefano commented 2 years ago

can you share your config file just remove any keys and urls

Config below - When I started testing my Plex "Secure Connections" was set to Required. Thinking that may be a problem I relaxed it to preferred but same result. If I go back to Required (and this issue is resolved) can I use HTTPS in the config file so I maintain secure connections with the outside world? config.txt

meisnate12 commented 2 years ago

can you upload it vs paste it i need it with the spacing

meisnate12 commented 2 years ago

also yes you should be able to use HTTPS

domenicdistefano commented 2 years ago

can you upload it vs paste it i need it with the spacing

Edited my post above with attached config.txt

domenicdistefano commented 2 years ago

can you upload it vs paste it i need it with the spacing

Edited my post above with attached config.txt

Also noticed something goofy. I also happen to use Portainer so I visually noticed this in the UI. Every time I start the container via the above command it adds a new / unique instance with a random name - see attached picture - stopped instances / containers in red. I am a Docker noob so I am guessing every time I fire this up its a brand new container that's spawned? Isn't that a problem? I had to clean out about a dozen of them...

portainerview
domenicdistefano commented 2 years ago

I just tried the Local Installation Walkthrough Guide using Python 3.99 (using Windows) on a completely different box and got the same results as above.

As an experiment I temporally changed the IP address of my plex server in the config file to something that isn't Plex to see if anything changed and receive the same error. I don't know if its just not getting to the Plex auth at all or maybe that's what's broken.

meisnate12 commented 2 years ago

the problem is with PMM reading your config file. in your file you have

libraries:                                      # Library mappings must have a colon (:) placed after them
  Movies-HIDDEN:
    metadata_path:
      - file: config/Movies.yml                 # You have to create this file the other are online
      - git: meisnate12/MovieCharts
      - git: meisnate12/Studios
      - git: meisnate12/IMDBGenres
      - git: meisnate12/People

  cache: true
  cache_expiration: 60
  asset_directory: config/assets
  asset_folders: true
  sync_mode: append
  show_unmanaged: true
  show_filtered: false
  show_missing: true
  save_missing: true
  run_again_delay: 2
  released_missing_only: false
  create_asset_folders: false
  missing_only_released: false
  collection_minimum: 1
  delete_below_minimum: true
  tvdb_language: eng

above cache: true should be a settings heading that you must have accidentally deleted

meisnate12 commented 2 years ago

Also for docker just start the container youve already created back up vs creating a whole new container for each run

domenicdistefano commented 2 years ago

Yes I was an idiot and was deleting that line accidently when editing the file as I was following the tutorial...

Next problem now is the TRAKT Oauth. I know I have the client ID and Secret correct in the config file but I keep getting the error upon redirect. Argh.

image

image

domenicdistefano commented 2 years ago

So I removed the TRAKT info for now so I could move on with the tutorial (Windows Local) using the example near the bottom with Bill Murray. I copy & pasted in the txt just as it is with no changes into a Movies yml file that matches my library name. Seems I am connecting OK but YAML Error: 'utf-8' codec can't decode byte 0x92 in position 578: invalid start byte gets returned.

image

image

libraries: # Library mappings must have a colon (:) placed after them Movies: metadata_path:


templates: Actor: actor: tmdb tmdb_person: <> tmdb_actor_details: <> sorttitle: +<> sync_mode: sync collection_order: release collection_mode: hide collections: Bill Murray: template: {name: Actor, person: 1532} Best of the 1980s: tmdb_discover: primary_release_date.gte: 01/01/1980 primary_release_date.lte: 12/31/1989 with_original_language: en sort_by: popularity.desc limit: 100 summary: A collection of the Top Content of the 1980s Vulture’s 101 Best Movie Endings: letterboxd_list: https://letterboxd.com/brianformo/list/vultures-101-best-movie-endings/

domenicdistefano commented 2 years ago

also yes you should be able to use HTTPS

OK, one last post / issue for this evening.

If I try to use HTTPS I get the below error shown in the first picture. (secure connections required in plex). However if I simply make it HTTP and change plex to prefer secure connections it works as shown in the second picture. So it seems HTTPS access isn't working?

plex:
url: https://10.10.10.38:32400

image plex:
url: http://10.10.10.38:32400
image

meisnate12 commented 2 years ago

for trakt your redirect uri must be urn:ietf:wg:oauth:2.0:oob as per the instructions

not sure exactly whats wrong with your yml file but the yaml decoder doesnt like it try using an online yaml validator

as for https it doesnt matter for PMM tbh because all im doing is using the plex api so im either able to ping the address or not.

domenicdistefano commented 2 years ago

First let me say how awesome this project is. What you have built is unbelievable.

For TRAKT again its my fault / RTFM issue. The string of XXXXs in the template led me to think I just needed to enter the two strings without reading ahead further into the Wiki learning about the urn:ietf:wg:oauth:2.0:oob.

For HTTPS / required secure connections on the Plex side I am also baffled because if I hit the same local Plex URL in a local browser on the box running PMM the Plex UI comes up fine.

Thanks again for the help & happy to be a typical noob going through your docs :).

meisnate12 commented 2 years ago

Thanks for the compliments and glad i could help let me know if you've got any more questions and feel free to hop on the PMM discord for more direct help! I'm going to close this for now since your issues for the most part are resolved