Media-Scripts icon indicating copy to clipboard operation
Media-Scripts copied to clipboard

Problem processing Movies; Unknown filter field "filters"

Open Healzangels opened this issue 1 year ago • 1 comments

Greetings! Wanted to start off by saying thank you for making and sharing such an awesome script! Has been a life saver when it comes to backing up and pulling my posters out of my Plex library!

I've been running the script manually every few weeks and recently when I went to run it found I was getting the error message below. I made sure to update the grab-all-posters.py script which I saw was updated ~ a week ago which seemed to make collections process however when trying to do the Movie or TV Show collection without collection or after the collection has run see the following:

I'm sure I've overlooked something silly so really thank and appreciate any assistance in getting me back on track. Thanks again!

Loading movies new since 2022-07-03 13:06:30.119351 ...
Problem processing Movies; Unknown filter field "filters" for libtype "movie". Available filter fields: ['title', 'studio', 'userRating', 'contentRating', 'year', 'decade', 'originallyAvailableAt', 'duration', 'unmatched', 'duplicate', 'genre', 'collection', 'director', 'writer', 'producer', 'actor', 'country', 'addedAt', 'viewCount', 'lastViewedAt', 'unwatched', 'resolution', 'hdr', 'mediaSize', 'mediaBitrate', 'subtitleLanguage', 'audioLanguage', 'inProgress', 'trash', 'editionTitle', 'label']
Complete!

Happy to provide any additional logs/examples of my .env file.

Healzangels avatar Jun 30 '24 20:06 Healzangels

Gave it another shot by starting from scratch. DLed new copy of files, created a new .env but unfortunately same results. Thanks!

Healzangels avatar Jul 10 '24 02:07 Healzangels

I can't reproduce this with a new checkout of hte code:

Starting grab-all-posters 0.8.9c at 2024-08-26 19:05:43
Threaded downloads: False
connecting to http://192.168.1.11:32400...
Loading Kometa-Demo-Movies ...
Resetting rundate for Kometa-Demo-Movies to 2022-08-29 19:05:43.398837...
Skipping collection artwork ...
Loading movies new since 2022-08-29 19:05:43.398837 ...
Completed loading 222 of 222 movie(s) from Kometa-Demo-Movies
on 0: 12th Fail - 1 posters
on 1: 21 Jump Street - 1 posters
on 2: 22 Jump Street - 1 posters
on 3: 1776 - 1 posters
on 4: Abigail - 1 posters
on 5: About Time - 1 posters
on 6: The Adventures of Sharkboy and Lavagirl 3-D - 1 posters
on 7: Alien - 1 posters
on 8: Alone in the Dark - 1 posters
on 9: Amadeus - 1 posters
on 10: American Beauty - 1 posters
on 11: The Animatrix - 1 posters
on 12: Ant-Man - 1 posters
on 13: Ant-Man and the Wasp - 1 posters
on 14: Anyone But You - 1 posters
on 15: Apocalypse Now - 1 posters
on 16: Argylle - 1 posters
on 17: modified 'Avengers: Endgame (2019) {imdb-tt4154796}' to 'Avengers Endgame (2019) {imdb-tt4154796}'; this will need to be renamed for asset use
on 17: Avengers: Endgame - 1 posters
on 18: Baaghi 3 - 1 posters
on 19: Baby Geniuses - 1 posters
on 20: Back to Black - 1 posters
Grab all posters Kometa-Demo-Movies |███▋⚠︎                                   | (!) 20/222 [9%] in 44.5s (0.45/s)
...

chazlarson avatar Aug 26 '24 19:08 chazlarson

Hey, thanks for the follow up. I’ll give this another shot tonight and see if I can’t provide any additional information or maybe get it working. Thanks again!

Healzangels avatar Aug 26 '24 19:08 Healzangels

Shucks, sadly no luck. I downloaded a fresh copy, deleted my existing .env and used the template to create a new one.

My current .env looks like this:

PLEXAPI_PLEXAPI_TIMEOUT='360'
PLEXAPI_AUTH_SERVER_BASEURL=https://plex.myserver.com
                                             # Just the base URL, no /web or anything at the end.
                                             # i.e. http://192.168.1.11:32400 or the like
PLEXAPI_AUTH_SERVER_TOKEN=xxxxxxxxxxxxxx
PLEXAPI_LOG_BACKUP_COUNT='3'
PLEXAPI_LOG_FORMAT='%(asctime)s %(module)12s:%(lineno)-4s %(levelname)-9s %(message)s' # PLEX API ENV VARS
PLEXAPI_LOG_LEVEL='INFO'
PLEXAPI_LOG_PATH='plexapi.log'
PLEXAPI_LOG_ROTATE_BYTES='512000'
PLEXAPI_LOG_SHOW_SECRETS='false'
NO_FS_WARNING=1

# GENERAL ENV VARS
TMDB_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx https://developers.themoviedb.org/3/getting-started/introduction
TVDB_KEY=TVDB_V4_API_KEY                     # currently not used; https://thetvdb.com/api-information
DELAY=1                                      # optional delay between items
LIBRARY_NAMES=Movies                         # comma-separated list of libraries to act on

# IMAGE DOWNLOAD ENV VARS
## what-to-grab
GRAB_SEASONS=1                               # should get-all-posters retrieve season posters?
GRAB_EPISODES=0                              # should get-all-posters retrieve episode posters? [requires GRAB_SEASONS]
GRAB_BACKGROUNDS=1                           # should get-all-posters retrieve backgrounds?
ONLY_CURRENT=1                               # should get-all-posters retrieve ONLY current artwork?
ARTWORK=1                                    # current background is downloaded with current poster
INCLUDE_COLLECTION_ARTWORK=0                 # should get-all-posters retrieve collection posters?
ONLY_COLLECTION_ARTWORK=0                    # should get-all-posters retrieve ONLY collection posters?
#ONLY_THESE_COLLECTIONS=Bing|Bang|Boing       # only grab artwork for these collections and items in them
POSTER_DEPTH=20                              # grab this many posters [0 grabs all]
KEEP_JUNK=0                                  # keep files that script would normally delete [incorrect filetypes, mainly]
FIND_OVERLAID_IMAGES=0                       # check all downloaded images for overlays
# RETAIN_OVERLAID_IMAGES=0                   # keep images that have an overlay EXIF tag [this will override the following two]
RETAIN_KOMETA_OVERLAID_IMAGES=0              # keep images that have the Kometa overlay EXIF tag 
RETAIN_TCM_OVERLAID_IMAGES=0                 # keep images that have the TCM overlay EXIF tag 

## where-to-put-it
USE_ASSET_NAMING=1                           # should grab-all-posters name images to match Kometa's Asset Directory requirements?
USE_ASSET_FOLDERS=1                          # should those Kometa-Asset-Directory names use asset folders?
USE_ASSET_SUBFOLDERS=0                       # create asset folders in subfolders ["Collections", "Other", or [0-9, A-Z]] ]
ASSETS_BY_LIBRARIES=1                        # should those Kometa-Asset-Directory images be sorted into library folders?
ASSET_DIR=assets                             # top-level directory for those Kometa-Asset-Directory images
                                             # if asset-directory naming is on, the next three are ignored                                            
POSTER_DIR=extracted_posters                 # put downloaded posters here
CURRENT_POSTER_DIR=current_posters           # put downloaded current posters and artwork here
POSTER_CONSOLIDATE=0                         # if false, posters are separated into folders by library

## tracking
TRACK_URLS=1                                 # If set to 1, URLS are tracked and won't be downloaded twice
TRACK_COMPLETION=1                           # If set to 1, movies/shows are tracked as complete by rating id
TRACK_IMAGE_SOURCES=1                        # keep a file containing file names and source URLs

## general
POSTER_DOWNLOAD=1                            # if false, generate a script rather than downloading
FOLDERS_ONLY=0                               # Just build out the folder hierarchy; no image downloading
DEFAULT_YEARS_BACK=2                         # in absence of a "last run date", grab things added this many years back.
                                             # 0 sets the fallback date to the beginning of time
THREADED_DOWNLOADS=0                         # should downloads be done in the background in threads?
RESET_LIBRARIES=Bing,Bang,Boing              # reset "last time" count to the fallback date for these libraries
RESET_COLLECTIONS=Bing,Bang,Boing            # CURRENTLY UNUSED
ADD_SOURCE_EXIF_COMMENT=1                    # CURRENTLY UNUSED

# STATUS ENV VARS
PLEX_OWNER=yournamehere                      # account name of the server owner
TARGET_PLEX_URL=https://plex.domain2.tld     # As above, the target of apply_all_status
TARGET_PLEX_TOKEN=PLEX-TOKEN-TWO             # As above, the target of apply_all_status
TARGET_PLEX_OWNER=yournamehere               # As above, the target of apply_all_status
LIBRARY_MAP={"LIBRARY_ON_PLEX":"LIBRARY_ON_TARGET_PLEX", ...}
                                             # In apply_all_status, map libraries according to this JSON.

# RESET-POSTERS ENV VARS
TRACK_RESET_STATUS=1                         # should reset-posters-* keep track of status and pick up where it left off?
LOCAL_RESET_ARCHIVE=1                        # should reset-posters-tmdb keep a local archive of posters?
TARGET_LABELS=this label, that label         # comma-separated list of labels to reset posters on
REMOVE_LABELS=0                              # attempt to remove the TARGET_LABELs from items after resetting the poster
RESET_SEASONS=1                              # reset-posters-* resets season artwork as well in TV libraries
RESET_EPISODES=1                             # reset-posters-* resets episode artwork as well in TV libraries [requires RESET_SEASONS=True]
RETAIN_RESET_STATUS_FILE=0                   # Don't delete the reset progress file at the end
FLUSH_STATUS_AT_START=0                      # Delete the reset progress file at the start instead of reading it
RESET_SEASONS_WITH_SERIES=0                  # If there isn't a season poster, use the series poster
DRY_RUN=0                                    # [currently only works with reset-posters-*]; don't actually do anything, just log

# LIST ITEM IDS ENV VARS
INCLUDE_COLLECTION_MEMBERS=0
ONLY_COLLECTION_MEMBERS=0

# DELETE_COLLECTION ENV VARS
KEEP_COLLECTIONS=bing,bang                   # List of collections to keep

# REMATCH-ITEMS ENV VARS
UNMATCHED_ONLY=1                             # If 1, only rematch things that are currently unmatched

# RESET_ADDED_AT
ADJUST_DATE_FUTURES_ONLY=0                   # Only look at items that show up as added in the future
ADJUST_DATE_EPOCH_ONLY=1                     # Only adjust items that have "originally available" dates of `1970-01-01`

# REFRESH_METADATA
REFRESH_1970_ONLY=1                          # If 1, only refresh things that have an originally-available date of 1970-01-01

# ACTOR ENV VARS
CAST_DEPTH=20                                # how deep to go into the cast for actor collections
TOP_COUNT=10                                 # how many actors to export
JOB_TYPE=Actor                               # Actor or Director
KNOWN_FOR_ONLY=0                             # ignore cast members who are not primarily known as JOBTYPE
BUILD_COLLECTIONS=0                          # build yaml for Kometa config.yml
NUM_COLLECTIONS=20                           # this many actors in Kometa yaml
TRACK_GENDER=1                               # Pay attention to actor gender [as recorded on TMDB]
MIN_GENDER_NONE=5                            # include minimum this many "none" gendered actors in the YAML, if possible
MIN_GENDER_FEMALE=5                          # include minimum this many "female" gendered actors in the YAML, if possible
MIN_GENDER_MALE=5                            # include minimum this many "male" gendered actors in the YAML, if possible
MIN_GENDER_NB=5                              # include minimum this many "non-binary" gendered actors in the YAML, if possible

# LOW POSTER COUNT
POSTER_THRESHOLD=10

# CREW COUNT
CREW_DEPTH=20
CREW_COUNT=100
TARGET_JOB=Director
SHOW_JOBS=0

# attempt to hide sqlalchemy2 warnings
SQLALCHEMY_WARN_20=0
SQLALCHEMY_SILENCE_UBER_WARNING=1

I didn't change very much outside of adding API keys. Was able to confirm the Collection grabbing works fine however still seeing that filter error when attempting movies.

Not sure if anything stands out on my .env that might be a problem. I am currently running the script from a Windows VM so my next step will be to create a new VM/test from another location in case there is some issue with python etc on that VM.

Is there any other locations besides .env I should be checking potentially? Thanks again for the assistance!

Healzangels avatar Aug 27 '24 17:08 Healzangels

Looks like it was an issue that crept into my python installation. Uninstall/reinstalled, installed requirements and everything is working as it should. Thanks again for the amazing scripts! Cheers!

Healzangels avatar Aug 28 '24 05:08 Healzangels