nwithan8 / tauticord

A Discord bot that displays live data from Tautulli
GNU General Public License v3.0
102 stars 22 forks source link

[HELP] - <'str' object has no attribute 'get'> #214

Closed Glitch3dPenguin closed 2 months ago

Glitch3dPenguin commented 2 months ago

This issue has not already been resolved

You have read the documentation

Installation Type

Docker Compose

Configuration Type

Configuration File

Type of Issue

Running (e.g. Tauticord not starting)

Issue Details

My installed version of Tauticord is not running in docker-compose after I edit the config file. I am guessing that my issue is that this config simply is not set up correctly but the provided example config seems to be out of date. This is what my config looks like:

# yaml-language-server: $schema=https://raw.githubusercontent.com/nwithan8/tauticord/master/.schema/config_v2.schema.json

Discord:
  AdminIDs: [375440484463804427]
  BotToken: 'xxxxxxxxxx'
  ChannelName: heading
  EnableSlashCommands: true
  PostSummaryMessage: true
  ServerID: 'xxxxxxxxxx'
  StatusMessage:
    CustomMessage: ''
    Enable: true
    ShowStreamCount: true
Display:
  Anonymize:
    HideBandwidth: false
    HideETA: false
    HidePlatforms: false
    HidePlayerNames: false
    HideProgress: false
    HideQuality: false
    HideTranscode: false
    HideUsernames: true
  ServerName: High Seas Plex
  ThousandsSeparator: ''
  Time:
    ServerTimeZone: UTC
    Use24HourTime: false
  UseFriendlyNames: true
Extras:
  AllowAnalytics: true
  EnableUpdateReminders: true
Stats:
  Activity:
    CategoryName: WELLERMAN
    Enable: true
    StatTypes:
      Bandwidth:
        CustomEmoji: ''
        CustomName: ''
        Enable: true
        VoiceChannelID: 1118033577184067584
      LocalBandwidth:
        CustomEmoji: ''
        CustomName: ''
        Enable: false
        VoiceChannelID: 0
      PlexServerAvailability:
        CustomEmoji: ''
        CustomName: ''
        Enable: true
        VoiceChannelID: 1118033574558433352
      RemoteBandwidth:
        CustomEmoji: ''
        CustomName: ''
        Enable: false
        VoiceChannelID: 0
      StreamCount:
        CustomEmoji: ''
        CustomName: ''
        Enable: true
        VoiceChannelID: 1118033575489568780
      TranscodeCount:
        CustomEmoji: ''
        CustomName: ''
        Enable: false
        VoiceChannelID: 0
  Libraries:
    CategoryName: CARGO HOLD
    CombinedLibraries: []
    Enable: true
    Libraries: [Movies, TV Shows, Anime Shows, Anime Movies]
    RefreshSeconds: 3600
  Performance:
    CategoryName: Performance
    Enable: false
    Metrics:
      CPU:
        CustomEmoji: ''
        CustomName: ''
        Enable: false
        VoiceChannelID: 0
      DiskSpace:
        CustomEmoji: ''
        CustomName: ''
        Enable: false
        VoiceChannelID: 0
      Memory:
        CustomEmoji: ''
        CustomName: ''
        Enable: false
        VoiceChannelID: 0
      UserCount:
        CustomEmoji: ''
        CustomName: ''
        Enable: false
        VoiceChannelID: 0
Tautulli:
  APIKey: 'xxxxxxxxx'
  RefreshSeconds: 15
  TerminateMessage: Your stream has ended.
  URL: 'https://plexstats.klabsdev.com'
  UseSelfSignedCert: false

Steps to Reproduce

Start a new docker install and use my config.

Logs

___________________  ______________________________________________ 
___  __/__    |_  / / /__  __/___  _/_  ____/_  __ \__  __ \__  __ \
__  /  __  /| |  / / /__  /   __  / _  /    _  / / /_  /_/ /_  / / /
_  /   _  ___ / /_/ / _  /   __/ /  / /___  / /_/ /_  _, _/_  /_/ / 
/_/    /_/  |_\____/  /_/    /___/  \____/  \____/ /_/ |_| /_____/  
Version 5.3.4, Python 3.11.8 (main, Feb 19 2024, 17:01:17) [GCC 13.2.1 20231014]
Copyright © 2024 Nate Harris. All rights reserved.
2024-04-15 21:03:00,327 - [INFO]: Migration 001 skipped
2024-04-15 21:03:00,327 - [INFO]: Migration 002 skipped
2024-04-15 21:03:00,337 - [CRITICAL]: Fatal error occurred. Shutting down: 'str' object has no attribute 'get'
2024-04-15 21:03:00,337 - [CRITICAL]: Exiting with code 1

Supporting Information

No response

nwithan8 commented 2 months ago

Your Stats -> Libraries -> Libraries configuration is incorrect:

Libraries: [Movies, TV Shows, Anime Shows, Anime Movies]

Each library needs to have details provided, like so:

Libraries:
    # The name of the library in Plex
    - Name: "Audiobooks"
       # A friendlier name for the library to use in Discord
       AlternateName: "My Audiobooks"
       # The ID of the library in Tautulli, to differentiate between libraries with the same name. Set to 0 to ignore
       ID: 0
       # How to display stats for each type of media in this library
       # Only relevant stats will be included based on library type (e.g. a TV Show library will ignore Album settings)
       Albums:
            # The custom name for this metric
            CustomName: ''
            # The custom emoji for this metric
            CustomEmoji: ''
            # Whether to display this metric for this library
            Enable: true
            # Use a specific voice channel for this library's stats, rather than generating a new one
            VoiceChannelID: 0
       Artists:
            # The custom name for this metric
            CustomName: ''
            # The custom emoji for this metric
            CustomEmoji: ''
            # Whether to display this metric for this library
            Enable: true
            # The ID of the voice channel
            VoiceChannelID: 0
       Episodes:
            # The custom name for this metric
            CustomName: ''
            # The custom emoji for this metric
            CustomEmoji: ''
            # Whether to display this metric for this library
            Enable: true
            # The ID of the voice channel
            VoiceChannelID: 0
       Movies:
            # The custom name for this metric
            CustomName: ''
            # The custom emoji for this metric
            CustomEmoji: ''
            # Whether to display this metric for this library
            Enable: true
            # The ID of the voice channel
            VoiceChannelID: 0
       Series:
            # The custom name for this metric
            CustomName: ''
            # The custom emoji for this metric
            CustomEmoji: ''
            # Whether to display this metric for this library
            Enable: true
            # The ID of the voice channel
            VoiceChannelID: 0
       Tracks:
            # The custom name for this metric
            CustomName: ''
            # The custom emoji for this metric
            CustomEmoji: ''
            # Whether to display this metric for this library
            Enable: true
            # The ID of the voice channel
            VoiceChannelID: 0

I recommend using an IDE to edit your config, as it will catch config errors like this.

nwithan8 commented 2 months ago

Closing. If you need more help, just comment and keep this thread open.