Closed TonioRoffo closed 2 years ago
Hey @TonioRoffo
It looks like a value being compared is a string when the script is expecting an integer.
TypeError: '>' not supported between instances of 'str' and 'int'
DEBUG=3
in the mumc_config.py
file.mumc_DEBUG.log
located in the /home/xbmc/scripts/
folder attached to your reply.Here are the results mumc_DEBUG.log
This appears to be the last API call the script sent before it failed.
http://192.168.1.14:8096/emby/Users/6d9b1697f9b042ffaa77811b6765a606/Items/104736?enableImages=False&enableUserData=True&Fields=ParentId,Genres,Tags&api_key=f03613eb65c64dec92f5a15570eab6bd
Put this link into a browser that can access your Emby server; then press enter.
Here is the text
Still not able to reproduce this on my setup.
I have created a test script with debug already enabled and special debug output for the part that is failing. It should show exactly what the script is seeing before it fails.
mumc.py.txt
into your /home/xbmc/scripts/
foldermumc.py
to mumc.py.orig
mumc.py.txt
to mumc.py
mumc_DEBUG.log
located in the /home/xbmc/scripts/
folder attached to your reply.Thank you for your hard work :)
here is the debug log
[mumc_DEBUG.log](https://github.com/terrelsa13/MUMC/files/9762281/mumc_DEBUG.log)
No problem!
Good news. Found the exact media item that is causing the issue.
For some reason the Season# (aka ParentIndexNumber
) for the episode is "??" instead of a number.
You can see this in the last section of the mumc_DEBUG.log
.
deleteItem['ParentIndexNumber'] : Is String
deleteItem['ParentIndexNumber'] = ??
You will also be able to see all of the debug output sections above the last one show the Season# is an integer instead of a string.
Same steps; new link.
Put this link into a browser that can access your Emby server; then press enter.
http://192.168.1.14:8096/emby/Users/6d9b1697f9b042ffaa77811b6765a606/Items/105642?enableImages=False&enableUserData=True&Fields=ParentId,Genres,Tags&api_key=f03613eb65c64dec92f5a15570eab6bd
aah, that makes sense. I've checked this show and it's a sport series, all of them had ?? as season entry, somehow.
Those were supposed to be deleted anyway, so I have removed them manually, after which the script runs without problem.
All solved - Thank you!
Great! Glad we got it working.
Do you mind still attaching the output from the link?
http://192.168.1.14:8096/emby/Users/6d9b1697f9b042ffaa77811b6765a606/Items/105642?enableImages=False&enableUserData=True&Fields=ParentId,Genres,Tags&api_key=f03613eb65c64dec92f5a15570eab6bd
I want to see if there are some other metadata attributes for this episode I can use to prevent this error for happening again or for anyone else that might have the same issue.
Hello, sorry, but I don't have the file anymore, was too late to see your remark, sorry.
It's all good!
Getting a traceback after MUMC lists all files to delete/keep (which is working correctly)
:*[DELETE] - Episode - Whose Line Is It Anyway - s17.e02 - Gary Anthony Williams 7 - ABC - Played 551 days ago - Play Count: 1 - Created 631 days ago - Favorite: False - WhiteTag: False - BlackTag: False - Whitelisted: False - EpisodeID: 104736
Traceback (most recent call last): File "/home/xbmc/scripts/mumc.py", line 8683, in
deleteItems=get_media_items()
File "/home/xbmc/scripts/mumc.py", line 6873, in get_media_items
deleteItems=get_minEpisodesToKeep(episodeCounts_byUserId, deleteItems)
File "/home/xbmc/scripts/mumc.py", line 3618, in get_minEpisodesToKeep
if (deleteItem['ParentIndexNumber'] > episodeTracker[deleteItem['SeriesId']]['MaxSeason']):
TypeError: '>' not supported between instances of 'str' and 'int'
Files aren't being deleted.
Emby user used has rights to delete files.
Running with either python3 or python3.8