JBOPS icon indicating copy to clipboard operation
JBOPS copied to clipboard

Inactive User script fails when trying to remove a user

Open Lonewolf147 opened this issue 9 months ago • 0 comments

When the script runs, it returns the following error when it tries to remove a user:

Traceback (most recent call last): File "/config/scripts/purge_inactive_users.py", line 154, in ACCOUNT.removeFriend(PLEX_USERS[UID]) File "/lsiopy/lib/python3.11/site-packages/plexapi/myplex.py", line 455, in removeFriend return self.query(url, self._session.delete) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/lsiopy/lib/python3.11/site-packages/plexapi/myplex.py", line 245, in query raise BadRequest(message) plexapi.exceptions.BadRequest: (410) gone; https://plex.tv/api/friends/68671525

Link to script with bug/issue https://github.com/blacktwin/JBOPS/blob/master/utility/remove_inactive_users.py

To Reproduce

Steps to reproduce the behavior:

  1. Go to 'User Scripts' under unraid settings
  2. Click on 'Run Script' for the specified script
  3. See error

Expected behavior Users that meet the inactive threshold in the script should be removed.

Additional context This script had been working fine, then this started happening a few weeks ago.

Lonewolf147 avatar May 07 '24 19:05 Lonewolf147