JBOPS icon indicating copy to clipboard operation
JBOPS copied to clipboard

IssueTypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'

Open akizzle opened this issue 2 years ago • 0 comments

Receiving the below error when running the below. python3 media_manager.py --libraries "Movies" --select unwatched --date "2016-01-01" --action delete

However running it with --action show works with flying colors.

A clear and concise description of what the bug is.

Checking library: 'Movies' watch statuses... The following items were added before 2016-01-01 and marked for deletion. Traceback (most recent call last): File "media_manager.py", line 690, in plex_deletion(unwatched_lst, libraries, opts.toggleDeletion) File "media_manager.py", line 315, in plex_deletion plex_item = plex.fetchItem(int(item.rating_key)) TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'

Provide logs

Tautulli logs - Please follow Tautulli's guide for sharing logs. Please provide a link to a gist or pastebin. https://pastebin.com/XCrXm6Es

PlexAPI logs - Create or find your logs location for PlexAPI. Please follow Tautulli's guide for sharing logs. Please provide a link to a gist or pastebin. I don't see a log file in the /.local/lib/python3.8/site-packages/plexapi directory.

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

To Reproduce

Steps to reproduce the behavior: run script in linux or windows

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior Proceed with script.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows & Linux
  • Python Version 3.10.5 & 3.8,10
  • PlexAPI version [e.g. 4.1.0]

Additional context Add any other context about the problem here.

akizzle avatar Jun 23 '22 01:06 akizzle