JBOPS
JBOPS copied to clipboard
Inactive User script fails when trying to remove a user
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:
- Go to 'User Scripts' under unraid settings
- Click on 'Run Script' for the specified script
- 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.