Error in log while searching : TypeError: list indices must be integers or slices, not str

Post any problems / bugs / issues that are Mylar-related in here.
Post Reply
sillyburrito
Posts: 5
Joined: Sun Aug 20, 2023 1:08 am

Error in log while searching : TypeError: list indices must be integers or slices, not str

Post by sillyburrito »

Good evening! I noticed that I hadn't received anything in a month or so, and for some reason, I'm seeing this every time there's a search in my logs. I went ahead and updated everything, rebooted my Pi, and I'm still seeing this.

ERROR Traceback (most recent call last):
File "/opt/mylar/mylar/search.py", line 2496, in searchforissue
foundNZB, prov = search_init(
File "/opt/mylar/mylar/search.py", line 525, in search_init
findit = search_the_matrix(scarios)
File "/opt/mylar/mylar/search.py", line 4209, in search_the_matrix
return NZB_SEARCH(
File "/opt/mylar/mylar/search.py", line 1128, in NZB_SEARCH
if len(bb['entries']) > 0:
TypeError: list indices must be integers or slices, not str

I thought it might be due to stale entries in my wishlist, so I manually downloaded everything I could and refreshed it so that Mylar knows that it's there. I'm down to two entries on my wishlist but still getting the above. I've tested all my providers and they all return successful.

Thanks for any help you can give!

Requested Info:

The build of Mylar you're running ( Master / Development ) and the commit.
[aa00fab3e574475d0452a3f9b2164a18b6b206f9] development

What OS you are running Mylar on.
DietPi 8.20.1 (Debian), Raspberry Pi 4, Python 3.9.2

What the problem is in as much detail as possible (if you can indicate your workflow as to how you got the issue if it can be replicated) -
Receving an error in the log: TypeError: list indices must be integers or slices, not str

If it is in regards to post-processing / downloading - your method of download (SABnzbd, NZBGet, Torrents, Blackhole) and the provider(s) you're having issues with. -
Using NZBGet with Dog, DS and Geek

Any errors whether in the web browser, console window, etc. -
Nothing showing in the browser, just in the logs

The mylar.log file (post the portion that's relevant to your issue at hand - showing if applicable, any errors, and the relevant portion of the log leading up to said errors if they exist) -
ERROR Traceback (most recent call last):
File "/opt/mylar/mylar/search.py", line 2496, in searchforissue
foundNZB, prov = search_init(
File "/opt/mylar/mylar/search.py", line 525, in search_init
findit = search_the_matrix(scarios)
File "/opt/mylar/mylar/search.py", line 4209, in search_the_matrix
return NZB_SEARCH(
File "/opt/mylar/mylar/search.py", line 1128, in NZB_SEARCH
if len(bb['entries']) > 0:
TypeError: list indices must be integers or slices, not str
sillyburrito
Posts: 5
Joined: Sun Aug 20, 2023 1:08 am

Re: Error in log while searching : TypeError: list indices must be integers or slices, not str

Post by sillyburrito »

Just found something interesting. It seems like this is only affecting the RSS search. If I uncheck that option, I'm not seeing the error above in the logs, and Mylar is working correctly (tried a new series as a test).
User avatar
evilhero
Site Admin
Posts: 2887
Joined: Sat Apr 20, 2013 3:43 pm
Contact:

Re: Error in log while searching : TypeError: list indices must be integers or slices, not str

Post by evilhero »

That error means that one of your providers isn't returning a valid response - could be down, the search might not be valid (for rss), or the url could be invalid even.

I would try one provider at a time if possible doing a search each time to see which one is causing the error. If you suspect it's rss, you can do a force rss search from the configuration page after each provider change to try and narrow it down abit easier.

If I had to take a guess without seeing any logs, I would say that the torrent provider is probably the culprit, but that's just me being hypothetical.

You can always generate a carepackage and post the link here so that we can see what's going on, if you're still having problems.
sillyburrito
Posts: 5
Joined: Sun Aug 20, 2023 1:08 am

Re: Error in log while searching : TypeError: list indices must be integers or slices, not str

Post by sillyburrito »

evilhero wrote: Sun Aug 20, 2023 3:02 pm That error means that one of your providers isn't returning a valid response - could be down, the search might not be valid (for rss), or the url could be invalid even.

I would try one provider at a time if possible doing a search each time to see which one is causing the error. If you suspect it's rss, you can do a force rss search from the configuration page after each provider change to try and narrow it down abit easier.

If I had to take a guess without seeing any logs, I would say that the torrent provider is probably the culprit, but that's just me being hypothetical.

You can always generate a carepackage and post the link here so that we can see what's going on, if you're still having problems.
Thanks, that's what I was thinking as well, but I checked all of my providers just now and everything "appears" to be on the up and up. I'm not using any torrents, just Dog/DS/Geek/Experimental.

I've uploaded a care package to https://1drv.ms/u/s!AkKFvQNp_WCXmhOvARe ... F?e=96Gyqq, but I'm going to still tinker and see what I can find.
sillyburrito
Posts: 5
Joined: Sun Aug 20, 2023 1:08 am

Re: Error in log while searching : TypeError: list indices must be integers or slices, not str

Post by sillyburrito »

Just tested every single provider by themselves, and I still get the RSS search error for each. I unchecked all but one, restarted Mylar, and then did a force check on my wanted issues.
sillyburrito
Posts: 5
Joined: Sun Aug 20, 2023 1:08 am

Re: Error in log while searching : TypeError: list indices must be integers or slices, not str

Post by sillyburrito »

Was this fixed in the [e210d31af07a5abaad3750710d5c8276ef20dae4] version? I just updated and ran a force check, and everything is working normally with RSS enabled. If so, thank you very much!
Post Reply