Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plex Error when utilizing Config Secrets for the plex token #2197

Open
educatedCaveman opened this issue Aug 17, 2024 · 17 comments
Open

Plex Error when utilizing Config Secrets for the plex token #2197

educatedCaveman opened this issue Aug 17, 2024 · 17 comments
Assignees
Labels
bug Bug is with Plex Meta Manager status:not-yet-viewed I haven't reviewed the Feature or Bug yet

Comments

@educatedCaveman
Copy link

Version Number

2.0.2

What branch are you on?

master

Describe the Bug

I'm running Kometa on Kubernetes. I have used the example cronJob manifest as a starting point, and made relatively minor changes to suit my setup (configs linked below). A goal of mine is to keep all my configs under source control (GitHub), and also to not store tokens or API keys in plaintext. To accomplish that, I found the section of the documentation for Config Secrets. I've added a secret containing my various keys for Kometa, and the usage of <<env_var>> seems to work fine. Except for the Plex token. When I run with the plex token obfuscated, it reports:

Plex Error: Plex Token is read only. Please get a new token

I don't think there is an issue with the Plex token because if I hardcode the token, it works perfectly; no error is reported and it does its thing.

I've also verified the environment variable $KOMETA_PLEX_TOKEN returns the token as I entered it when creating the secret.

If it would help to look at my files, they are here. The cronJob manifest is here, and the config creating the error is here.

Relevant Collection/Overlay/Playlist Definition

No response

Logs

https://gist.github.com/educatedCaveman/a0054a551b12df075fc467a401a7cd28

@educatedCaveman educatedCaveman added bug Bug is with Plex Meta Manager status:not-yet-viewed I haven't reviewed the Feature or Bug yet labels Aug 17, 2024
@bakerboy448
Copy link
Contributor

appears to be more than just plex related
https://discord.com/channels/822460010649878528/1275146457631948802

@bakerboy448
Copy link
Contributor

can confirm Nightly28 is the culprit, it works on 27

suspected RCA ff80a8d

@YozoraXCII
Copy link
Contributor

@educatedCaveman can you confirm if you are seeing this on 2.0.2 or if you are running on develop/nightly? These may be unrelated issues compared to what has been found on the Discord

@educatedCaveman
Copy link
Author

@YozoraXCII, yes, I think I can. the logs I've generated reference v2.0.2, and in my cronjob.yml file I have image: kometateam/kometa:v2.0.2

@meisnate12 meisnate12 mentioned this issue Aug 22, 2024
1 task
@meisnate12
Copy link
Member

@educatedCaveman can you confirm this is fixed on 2.1.0

@educatedCaveman
Copy link
Author

I think I'm still having an issue, but I'll have to dig into it this weekend (been super busy).

@trentmaetzold
Copy link

Couple things:

1: The docs show secrets in lowercase. They need to be uppercase in the config.yml
2: Kometa is only reading in 1 secret

Here is the relevant section from my config.yml:

plex:
  url: <<PLEX_URL>>
  token: <<PLEX_TOKEN>>
  timeout: 60
  db_cache:
  clean_bundles: false
  empty_trash: false
  optimize: false
  verify_ssl:
tmdb:
  apikey: <<TMDB_APIKEY>>
  language: en
  cache_expiration: 60
  region:

And here is the relevant output from the command line run:

|====================================================================================================|
|                                                                                                    |
|                   __  ___  ______    ___  ___   _______  __________    ___                         |
|                  |  |/  / /  __  \  |   \/   | |   ____||          |  /   \                        |
|                  |  '  / |  |  |  | |  \  /  | |  |__   `---|  |---` /  ^  \                       |
|                  |    <  |  |  |  | |  |\/|  | |   __|      |  |    /  /_\  \                      |
|                  |  .  \ |  `--`  | |  |  |  | |  |____     |  |   /  _____  \                     |
|                  |__|\__\ \______/  |__|  |__| |_______|    |__|  /__/     \__\                    |
|                                                                                                    |
|     Version: 2.1.0 (Python 3.12.7) (Branch: master)                                                |
|     Platform: Linux-6.1.106-Unraid-x86_64-with                                                     |
|     Total Memory: 252 GB                                                                           |
|     Available Memory: 211 GB                                                                       |
|====================================================================================================|
| Run Command: app/kometa/kometa.py --run                                                            |
| --config (KOMETA_CONFIG): "/config/config.yml"                                                     |
| --times (KOMETA_TIMES): "02:00"                                                                    |
| --run (KOMETA_RUN): True                                                                           |
| --tests (KOMETA_TESTS): False                                                                      |
| --debug (KOMETA_DEBUG): False                                                                      |
| --trace (KOMETA_TRACE): False                                                                      |
| --log-requests (KOMETA_LOG_REQUESTS): False                                                        |
| --timeout (KOMETA_TIMEOUT): 180                                                                    |
| --no-verify-ssl (KOMETA_NO_VERIFY_SSL): False                                                      |
| --collections-only (KOMETA_COLLECTIONS_ONLY): False                                                |
| --metadata-only (KOMETA_METADATA_ONLY): False                                                      |
| --playlists-only (KOMETA_PLAYLISTS_ONLY): False                                                    |
| --operations-only (KOMETA_OPERATIONS_ONLY): False                                                  |
| --overlays-only (KOMETA_OVERLAYS_ONLY): False                                                      |
| --run-collections (KOMETA_RUN_COLLECTIONS): None                                                   |
| --run-libraries (KOMETA_RUN_LIBRARIES): None                                                       |
| --run-files (KOMETA_RUN_FILES): None                                                               |
| --ignore-schedules (KOMETA_IGNORE_SCHEDULES): False                                                |
| --ignore-ghost (KOMETA_IGNORE_GHOST): False                                                        |
| --delete-collections (KOMETA_DELETE_COLLECTIONS): False                                            |
| --delete-labels (KOMETA_DELETE_LABELS): False                                                      |
| --resume (KOMETA_RESUME): None                                                                     |
| --no-countdown (KOMETA_NO_COUNTDOWN): False                                                        |
| --no-missing (KOMETA_NO_MISSING): False                                                            |
| --no-report (KOMETA_NO_REPORT): False                                                              |
| --read-only-config (KOMETA_READ_ONLY_CONFIG): False                                                |
| --divider (KOMETA_DIVIDER): "="                                                                    |
| --width (KOMETA_WIDTH): 100                                                                        |
|                                                                                                    |
| Kometa Secrets Read:                                                                               |
| --kometa-tmdb-apikey (KOMETA_TMDB_APIKEY): (redacted)                                              |
|                                                                                                    |
|====================================================================================================|
|                                            Starting Run                                            |
|====================================================================================================|

You can see that only the KOMETA_TMDB_APIKEY secret is being read. I'm on 2.1.0 and seems it's not fixed.

@chazlarson
Copy link
Contributor

chazlarson commented Nov 12, 2024

This just worked for me in 2.1.0 nightly and 2.1.0 master:

config.yml:

plex:
  url: <<plexurl>>
  token: <<plextoken>>
tmdb:
  apikey: <<tmdbkey>>

command line:

python kometa.py --run --kometa-plexurl http://192.168.1.11:32400 --kometa-plextoken BLAHBLAH --kometa-tmdbkey BLAHBLAH --config config/test-config.yml

log:

...
|     Version: 2.1.0-build16 (Python 3.12.6) (Git: nightly)                                          |
|     Newest Version: 2.1.0-build18                                                                  |
|     Platform: Linux-6.8.0-45-generic-x86_64-with-glibc2.35                                         |
...
| Kometa Secrets Read:                                                                               |
| --kometa-plexurl (KOMETA_PLEXURL): (redacted)                                                      |
| --kometa-plextoken (KOMETA_PLEXTOKEN): (redacted)                                                  |
| --kometa-tmdbkey (KOMETA_TMDBKEY): (redacted)                                                      |
|                                                                                                    |
|====================================================================================================|
|                                            Starting Run                                            |

run went on to connect to Plex and tmdb and completed without error.

@trentmaetzold
Copy link

@chazlarson Looks like you're using the CLI directly. I'm using KOMETA_*** env variables; only one of these variables is still being picked up on 2.1.0-build18.

[2024-11-14 05:14:04,727] [kometa.py:325]             [DEBUG]    | Kometa Secrets Read:
[2024-11-14 05:14:04,727] [kometa.py:327]             [DEBUG]    | --kometa-tmdb-apikey (KOMETA_TMDB_APIKEY): (redacted) 

@chazlarson
Copy link
Contributor

Env vars also working fine for me:

export kometa_plexurl=http://192.168.1.11:32400 && export kometa_plextoken=BLAH_BLAH && export kometa_tmdbkey=BLAHBLAH

then ran:

#!/bin/zsh

echo kometa_plexurl in ENV: $kometa_plexurl
echo kometa_plextoken in ENV: $kometa_plextoken
echo kometa_tmdbkey in ENV: $kometa_tmdbkey

python kometa.py --run --config config/test-config.yml -dc

Which produced:

> ./001.sh
kometa_plexurl in ENV: http://192.168.1.11:32400
kometa_plextoken in ENV: BLAHBLAH
kometa_tmdbkey in ENV: BLAHBLAH
...
|                  |__|\__\ \______/  |__|  |__| |_______|    |__|  /__/     \__\                    |
|                                                                                                    |
|     Version: 2.1.0 (Python 3.12.6) (Git: master)                                                   |
...
| Kometa Secrets Read:                                                                               |
| --kometa-plextoken (KOMETA_PLEXTOKEN): (redacted)                                                  |
| --kometa-tmdbkey (KOMETA_TMDBKEY): (redacted)                                                      |
| --kometa-plexurl (KOMETA_PLEXURL): (redacted)                                                      |
...

Followed by a successful run.

@trentmaetzold
Copy link

I unset the KOMETA_TIMES variable and it will not let me do --run. If I set the KOMETA_RUN variable, it still doesn't work. What is the -dc flag you're passing?

Here's my compose:

services:
  kometa:
    image: kometateam/kometa:latest
    container_name: kometa
    restart: unless-stopped
    volumes:
      - /mnt/user/appdata/kometa/config:/config
    environment:
      PUID: "99"
      PGID: "100"
      UMASK: "022"
      TZ: "America/Chicago"
      KOMETA_RUN: "true"
      KOMETA_CONFIG: "/config/config.yml"
      KOMETA_PLEX_URL: "http://10.10.3.1:32400"
      KOMETA_PLEX_TOKEN: "${PLEX_TOKEN}"
      KOMETA_TMDB_APIKEY: "${TMDB_APIKEY}"

Full config:

libraries:
  Movies:
    remove_overlays: true
    collection_files:
      - default: basic
      - default: imdb
      - default: genre
      - default: franchise
      - default: universe
      - default: content_rating_us
      - default: seasonal
      - default: decade
    overlay_files:
      - default: ribbon
      - default: resolution
  TV Shows:
    remove_overlays: true
    collection_files:
      - default: basic
      - default: imdb
      - default: tmdb
      - default: genre
      - default: franchise
      - default: universe
      - default: content_rating_us
      - default: decade
    overlay_files:
      - default: ribbon
      - default: resolution
playlist_files:
  - default: playlist
    template_variables:
      libraries: Movies, TV Shows

plex:
  url: <<PLEX_URL>>
  token: <<PLEX_TOKEN>>
  timeout: 60
  db_cache:
  clean_bundles: false
  empty_trash: false
  optimize: false
  verify_ssl:
tmdb:
  apikey: <<TMDB_APIKEY>>
  language: en
  cache_expiration: 60
  region:

settings:
  verify_ssl: false
  run_order:
    - operations
    - metadata
    - collections
    - overlays
  cache: true
  cache_expiration: 60
  asset_directory:
  asset_folders: true
  asset_depth: 0
  create_asset_folders: false
  prioritize_assets: false
  dimensional_asset_rename: false
  download_url_assets: false
  show_missing_assets: true
  show_missing_season_assets: false
  show_missing_episode_assets: false
  show_asset_not_needed: true
  sync_mode: append
  default_collection_order:
  minimum_items: 1
  item_refresh_delay: 0
  delete_below_minimum: false
  delete_not_scheduled: false
  run_again_delay: 0
  missing_only_released: false
  only_filter_missing: false
  show_unmanaged: true
  show_unconfigured: true
  show_filtered: false
  show_options: false
  show_missing: true
  save_report: false
  tvdb_language: default
  ignore_ids:
  ignore_imdb_ids:
  playlist_sync_to_users: all
  playlist_exclude_users:
  playlist_report: true
  custom_repo:
  overlay_artwork_filetype: jpg
  overlay_artwork_quality:

And I still get:

|====================================================================================================|
|                                                                                                    |
|                   __  ___  ______    ___  ___   _______  __________    ___                         |
|                  |  |/  / /  __  \  |   \/   | |   ____||          |  /   \                        |
|                  |  '  / |  |  |  | |  \  /  | |  |__   `---|  |---` /  ^  \                       |
|                  |    <  |  |  |  | |  |\/|  | |   __|      |  |    /  /_\  \                      |
|                  |  .  \ |  `--`  | |  |  |  | |  |____     |  |   /  _____  \                     |
|                  |__|\__\ \______/  |__|  |__| |_______|    |__|  /__/     \__\                    |
|                                                                                                    |
|     Version: 2.1.0 (Docker: master)                                                                |
|     Platform: Linux-6.1.106-Unraid-x86_64-with-glibc2.28                                           |
|     Total Memory: 252 GB                                                                           |
|     Available Memory: 214 GB                                                                       |
|====================================================================================================|
| Run Command: kometa.py                                                                             |
| --config (KOMETA_CONFIG): "/config/config.yml"                                                     |
| --times (KOMETA_TIMES): "05:00"                                                                    |
| --run (KOMETA_RUN): True                                                                           |
| --tests (KOMETA_TESTS): False                                                                      |
| --debug (KOMETA_DEBUG): False                                                                      |
| --trace (KOMETA_TRACE): False                                                                      |
| --log-requests (KOMETA_LOG_REQUESTS): False                                                        |
| --timeout (KOMETA_TIMEOUT): 180                                                                    |
| --no-verify-ssl (KOMETA_NO_VERIFY_SSL): False                                                      |
| --collections-only (KOMETA_COLLECTIONS_ONLY): False                                                |
| --metadata-only (KOMETA_METADATA_ONLY): False                                                      |
| --playlists-only (KOMETA_PLAYLISTS_ONLY): False                                                    |
| --operations-only (KOMETA_OPERATIONS_ONLY): False                                                  |
| --overlays-only (KOMETA_OVERLAYS_ONLY): False                                                      |
| --run-collections (KOMETA_RUN_COLLECTIONS): None                                                   |
| --run-libraries (KOMETA_RUN_LIBRARIES): None                                                       |
| --run-files (KOMETA_RUN_FILES): None                                                               |
| --ignore-schedules (KOMETA_IGNORE_SCHEDULES): False                                                |
| --ignore-ghost (KOMETA_IGNORE_GHOST): False                                                        |
| --delete-collections (KOMETA_DELETE_COLLECTIONS): False                                            |
| --delete-labels (KOMETA_DELETE_LABELS): False                                                      |
| --resume (KOMETA_RESUME): None                                                                     |
| --no-countdown (KOMETA_NO_COUNTDOWN): False                                                        |
| --no-missing (KOMETA_NO_MISSING): False                                                            |
| --no-report (KOMETA_NO_REPORT): False                                                              |
| --read-only-config (KOMETA_READ_ONLY_CONFIG): False                                                |
| --divider (KOMETA_DIVIDER): "="                                                                    |
| --width (KOMETA_WIDTH): 100                                                                        |
|                                                                                                    |
| Kometa Secrets Read:                                                                               |
| --kometa-tmdb-apikey (KOMETA_TMDB_APIKEY): (redacted)                                              |
|                                                                                                    |
|====================================================================================================|
|                                            Starting Run                                            |
|====================================================================================================|
| Locating config...                                                                                 |
| Using /config/config.yml as config                                                                 |
|========================================= Redacted Config ==========================================|
| libraries:                                                                                         |
|   Movies:                                                                                          |
|     remove_overlays: true                                                                          |
|     collection_files:                                                                              |
|       - default: basic                                                                             |
|       - default: imdb                                                                              |
|       - default: genre                                                                             |
|       - default: franchise                                                                         |
|       - default: universe                                                                          |
|       - default: content_rating_us                                                                 |
|       - default: seasonal                                                                          |
|       - default: decade                                                                            |
|     overlay_files:                                                                                 |
|       - default: ribbon                                                                            |
|       - default: resolution                                                                        |
|   TV Shows:                                                                                        |
|     remove_overlays: true                                                                          |
|     collection_files:                                                                              |
|       - default: basic                                                                             |
|       - default: imdb                                                                              |
|       - default: tmdb                                                                              |
|       - default: genre                                                                             |
|       - default: franchise                                                                         |
|       - default: universe                                                                          |
|       - default: content_rating_us                                                                 |
|       - default: decade                                                                            |
|     overlay_files:                                                                                 |
|       - default: ribbon                                                                            |
|       - default: resolution                                                                        |
| playlist_files:                                                                                    |
|   - default: playlist                                                                              |
|     template_variables:                                                                            |
|       libraries: Movies, TV Shows                                                                  |
|                                                                                                    |
| plex:                                                                                              |
|   url: (redacted)                                                                                  |
|   token: (redacted)                                                                                |
|   timeout: 60                                                                                      |
|   db_cache:                                                                                        |
|   clean_bundles: false                                                                             |
|   empty_trash: false                                                                               |
|   optimize: false                                                                                  |
|   verify_ssl:                                                                                      |
| tmdb:                                                                                              |
|   apikey: (redacted)                                                                               |
|   language: en                                                                                     |
|   cache_expiration: 60                                                                             |
|   region:                                                                                          |
|                                                                                                    |
| settings:                                                                                          |
|   verify_ssl: false                                                                                |
|   run_order:                                                                                       |
|     - operations                                                                                   |
|     - metadata                                                                                     |
|     - collections                                                                                  |
|     - overlays                                                                                     |
|   cache: true                                                                                      |
|   cache_expiration: 60                                                                             |
|   asset_directory:                                                                                 |
|   asset_folders: true                                                                              |
|   asset_depth: 0                                                                                   |
|   create_asset_folders: false                                                                      |
|   prioritize_assets: false                                                                         |
|   dimensional_asset_rename: false                                                                  |
|   download_url_assets: false                                                                       |
|   show_missing_assets: true                                                                        |
|   show_missing_season_assets: false                                                                |
|   show_missing_episode_assets: false                                                               |
|   show_asset_not_needed: true                                                                      |
|   sync_mode: append                                                                                |
|   default_collection_order:                                                                        |
|   minimum_items: 1                                                                                 |
|   item_refresh_delay: 0                                                                            |
|   delete_below_minimum: false                                                                      |
|   delete_not_scheduled: false                                                                      |
|   run_again_delay: 0                                                                               |
|   missing_only_released: false                                                                     |
|   only_filter_missing: false                                                                       |
|   show_unmanaged: true                                                                             |
|   show_unconfigured: true                                                                          |
|   show_filtered: false                                                                             |
|   show_options: false                                                                              |
|   show_missing: true                                                                               |
|   save_report: false                                                                               |
|   tvdb_language: default                                                                           |
|   ignore_ids:                                                                                      |
|   ignore_imdb_ids:                                                                                 |
|   playlist_sync_to_users: all                                                                      |
|   playlist_exclude_users:                                                                          |
|   playlist_report: true                                                                            |
|   custom_repo:                                                                                     |
|   overlay_artwork_filetype: jpg                                                                    |
|   overlay_artwork_quality:                                                                         |
|                                                                                                    |
|====================================================================================================|
| Initializing cache database at /config/config.cache                                                |
|====================================================================================================|
| notifiarr attribute not found                                                                      |
| gotify attribute not found                                                                         |
|====================================================================================================|
| Connecting to TMDb...                                                                              |
| TMDb Connection Successful                                                                         |
|====================================================================================================|
| omdb attribute not found                                                                           |
|====================================================================================================|
| mdblist attribute not found                                                                        |
|====================================================================================================|
| trakt attribute not found                                                                          |
|====================================================================================================|
| mal attribute not found                                                                            |
|====================================================================================================|
|                                                                                                    |
| Reading in Playlist Files                                                                          |
|                                                                                                    |
| Reading default: playlist                                                                          |
| Template Variables: {'libraries': 'Movies, TV Shows'}                                              |
|                                                                                                    |
| Loading Playlist File Default: playlist                                                            |
|                                                                                                    |
| File Loaded From: /defaults/playlist.yml                                                           |
|                                                                                                    |
| Reading default: templates                                                                         |
| File Loaded From: /defaults/templates.yml                                                          |
| Playlist File Loaded Successfully                                                                  |
|====================================================================================================|
| Connecting to Plex Libraries...                                                                    |
|====================================================================================================|
|                                        Movies Configuration                                        |
|====================================================================================================|
|                                                                                                    |
| Connecting to Movies Library...                                                                    |
|                                                                                                    |
| Reading in Collection Files                                                                        |
|                                                                                                    |
| Reading default: basic                                                                             |
|                                                                                                    |
| Reading default: imdb                                                                              |
|                                                                                                    |
| Reading default: genre                                                                             |
|                                                                                                    |
| Reading default: franchise                                                                         |
|                                                                                                    |
| Reading default: universe                                                                          |
|                                                                                                    |
| Reading default: content_rating_us                                                                 |
|                                                                                                    |
| Reading default: seasonal                                                                          |
|                                                                                                    |
| Reading default: decade                                                                            |
|                                                                                                    |
| Reading in Overlay Files                                                                           |
|                                                                                                    |
| Reading default: ribbon                                                                            |
|                                                                                                    |
| Reading default: resolution                                                                        |
|                                                                                                    |
|======================================== Plex Configuration ========================================|
| Traceback (most recent call last):                                                                 |
|   File "/modules/config.py", line 1154, in __init__                                                |
|     "url": check_for_attribute(lib, "url", parent="plex", var_type="url", default=self.general["plex"]["url"], req_default=True, save=False), |
|            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|   File "/modules/config.py", line 424, in check_for_attribute                                      |
|     raise Failed(f"Config Error: {attribute} attribute must be set under {parent} globally or under this specific Library") |
| modules.util.Failed: Config Error: url attribute must be set under plex globally or under this specific Library |
|                                                                                                    |
| Config Error: url attribute must be set under plex globally or under this specific Library         |
|                                                                                                    |
| Movies Library Connection Failed                                                                   |
|====================================================================================================|
|                                       TV Shows Configuration                                       |
|====================================================================================================|
|                                                                                                    |
| Connecting to TV Shows Library...                                                                  |
|                                                                                                    |
| Reading in Collection Files                                                                        |
|                                                                                                    |
| Reading default: basic                                                                             |
|                                                                                                    |
| Reading default: imdb                                                                              |
|                                                                                                    |
| Reading default: tmdb                                                                              |
|                                                                                                    |
| Reading default: genre                                                                             |
|                                                                                                    |
| Reading default: franchise                                                                         |
|                                                                                                    |
| Reading default: universe                                                                          |
|                                                                                                    |
| Reading default: content_rating_us                                                                 |
|                                                                                                    |
| Reading default: decade                                                                            |
|                                                                                                    |
| Reading in Overlay Files                                                                           |
|                                                                                                    |
| Reading default: ribbon                                                                            |
|                                                                                                    |
| Reading default: resolution                                                                        |
|                                                                                                    |
|======================================== Plex Configuration ========================================|
| Traceback (most recent call last):                                                                 |
|   File "/modules/config.py", line 1154, in __init__                                                |
|     "url": check_for_attribute(lib, "url", parent="plex", var_type="url", default=self.general["plex"]["url"], req_default=True, save=False), |
|            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|   File "/modules/config.py", line 424, in check_for_attribute                                      |
|     raise Failed(f"Config Error: {attribute} attribute must be set under {parent} globally or under this specific Library") |
| modules.util.Failed: Config Error: url attribute must be set under plex globally or under this specific Library |
|                                                                                                    |
| Config Error: url attribute must be set under plex globally or under this specific Library         |
|                                                                                                    |
| TV Shows Library Connection Failed                                                                 |
|====================================================================================================|
| Traceback (most recent call last):                                                                 |
|   File "/modules/config.py", line 1287, in __init__                                                |
|     raise Failed("Config Error: No libraries were found in config")                                |
| modules.util.Failed: Config Error: No libraries were found in config                               |
|                                                                                                    |
| Traceback (most recent call last):                                                                 |
|   File "//kometa.py", line 333, in start                                                           |
|     config = ConfigFile(my_requests, default_dir, attrs, secret_args)                              |
|              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                              |
|   File "/modules/config.py", line 1287, in __init__                                                |
|     raise Failed("Config Error: No libraries were found in config")                                |
| modules.util.Failed: Config Error: No libraries were found in config                               |
|                                                                                                    |
| Config Error: No libraries were found in config                                                    |
|                                                                                                    |
|========================================== Error Summary ===========================================|
|                                                                                                    |
| Count | Message                                                                                    |
|=======|============================================================================================|
|     2 | Config Error: url attribute must be set under plex globally or under this specific Library |
|                                                                                                    |
|========================================= Critical Summary =========================================|
|                                                                                                    |
| Count | Message                                                                                    |
|=======|============================================================================================|
|     1 | Config Error: No libraries were found in config                                            |
|                                                                                                    |
|====================================================================================================|
|                                            Finished Run                                            |
|                                           Version: 2.1.0                                           |
|                          Finished: 10:01:06 2024-11-14 Run Time: 0:00:00                           |
|====================================================================================================|

As you can see it's still only picking up one of the variables.

@trentmaetzold
Copy link

I stepped into the container and confirmed that my variables are set and correct. Didn't want to include that for obvious reasons.

@chazlarson
Copy link
Contributor

-dc deletes all collections prior to the run.

I'll see if I can repro it with docker, but so far I'm not seeing either the "must be lower case" or the "only one is read"

@trentmaetzold
Copy link

The lowercase one is weird, but if I leave my tmdb_apikey lowercase in the config it doesn't pick that one up.

@chazlarson
Copy link
Contributor

I also cannot repro any issues in docker.

@chazlarson
Copy link
Contributor

chazlarson commented Nov 14, 2024

plex:
  url: <<plexurl>>
  token: <<plextoken>>
tmdb:
  apikey: <<tmdbkey>>
services:
  kometa-test:
    image: kometateam/kometa:latest
    container_name: kometa
    restart: no
    volumes:
      - /home/chaz/kometa/config:/config
    environment:
      PUID: "1000"
      PGID: "1000"
      UMASK: "022"
      TZ: "America/Chicago"
      KOMETA_RUN: "true"
      KOMETA_CONFIG: "/config/test-config.yml"
      KOMETA_PLEXURL: "${kometa_plexurl}"
      KOMETA_PLEXTOKEN: "${kometa_plextoken}"
      KOMETA_TMDBKEY: "${kometa_tmdbkey}"
docker compose up kometa-test
WARN[0000] The "UID" variable is not set. Defaulting to a blank string.
WARN[0000] The "UID" variable is not set. Defaulting to a blank string.
WARN[0000] The "UID" variable is not set. Defaulting to a blank string.
WARN[0000] The "UID" variable is not set. Defaulting to a blank string.
[+] Running 1/0
 ✔ Container kometa  Created                                                                                                                                    0.0s
Attaching to kometa
...
kometa  | |                  |__|\__\ \______/  |__|  |__| |_______|    |__|  /__/     \__\                    |
kometa  | |                                                                                                    |
kometa  | |     Version: 2.1.0 (Docker: master)                                                                |
kometa  | |     Platform: Linux-6.8.0-45-generic-x86_64-with-glibc2.28                                         |
kometa  | |     Total Memory: 15 GB                                                                            |
kometa  | |     Available Memory: 8 GB                                                                         |
...
kometa  | | --run (KOMETA_RUN): True                                                                           |
...
kometa  | | Kometa Secrets Read:                                                                               |
kometa  | | --kometa-plextoken (KOMETA_PLEXTOKEN): (redacted)                                                  |
kometa  | | --kometa-tmdbkey (KOMETA_TMDBKEY): (redacted)                                                      |
kometa  | | --kometa-plexurl (KOMETA_PLEXURL): (redacted)                                                      |
kometa  | |                                                                                                    |

@trentmaetzold
Copy link

Okay. I think I solved. The secret part of the env can't have an underscore like I had. The below works. Thanks for your help.

services:
  kometa:
    image: lscr.io/linuxserver/kometa:latest
    container_name: kometa
    restart: unless-stopped
    volumes:
      - /mnt/user/appdata/kometa/config:/config
    environment:
      PUID: "99"
      PGID: "100"
      UMASK: "022"
      TZ: "America/Chicago"
      KOMETA_RUN: "false"
      KOMETA_CONFIG: "/config/config.yml"
      KOMETA_PLEXURL: "http://10.10.3.1:32400"
      KOMETA_PLEXTOKEN: "${PLEX_TOKEN}"
      KOMETA_TMDBKEY: "${TMDB_APIKEY}"
plex:
  url: <<plexurl>>
  token: <<plextoken>>
  timeout: 60
  db_cache:
  clean_bundles: false
  empty_trash: false
  optimize: false
  verify_ssl:
tmdb:
  apikey: <<tmdbkey>>
  language: en
  cache_expiration: 60
  region:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug is with Plex Meta Manager status:not-yet-viewed I haven't reviewed the Feature or Bug yet
Projects
None yet
Development

No branches or pull requests

6 participants