extrobe/plex_and_media_utilities

local variable 'target_rating_for_collection' referenced before assignment

Opened this issue · 0 comments

I'm trying to use this script, I have cloned the repo, installed PlexAPI and added my token to the script.

When I run the script, I get the following:

alex@optiplex:~/git/plex_and_media_utilities$ python3 plex_collection_content_rating.py

COLLECTION: 28 Days/Weeks Later Collection: gb/18
    FILM: 28 Days Later: 18 [rank:999]
    FILM: 28 Weeks Later: 18 [rank:999]
MIN RANK: 999
Traceback (most recent call last):
  File "/srv/dev-disk-by-label-data/users/alex/git/plex_and_media_utilities/plex_collection_content_rating.py", line 84, in <module>
    main()
  File "/srv/dev-disk-by-label-data/users/alex/git/plex_and_media_utilities/plex_collection_content_rating.py", line 81, in main
    update_collection_ratings()
  File "/srv/dev-disk-by-label-data/users/alex/git/plex_and_media_utilities/plex_collection_content_rating.py", line 47, in update_collection_ratings
    if collection.contentRating != target_rating_for_collection:
UnboundLocalError: local variable 'target_rating_for_collection' referenced before assignment
alex@optiplex:~/git/plex_and_media_utilities$