IndexError: list index out of range

Post any problems / bugs / issues that are Mylar-related in here.
Post Reply
escrima
Posts: 20
Joined: Sun Feb 12, 2017 7:18 pm

IndexError: list index out of range

Post by escrima »

Mylar Version: master
-- source build 3e12599502bc99343da8564762bd46277f5cdd8c.

So, suddenly after no changes to my config or installation Mylar throws the following when I click THIS WEEK:
500 Internal Server Error
The server encountered an unexpected condition which prevented it from fulfilling the request.

Traceback (most recent call last):
File "/usr/pbi/mylar-amd64/share/mylar/mylar/cherrypy/_cprequest.py", line 645, in respond
response.body = self.handler()
File "/usr/pbi/mylar-amd64/share/mylar/mylar/cherrypy/lib/encoding.py", line 188, in __call__
self.body = self.oldhandler(*args, **kwargs)
File "/usr/pbi/mylar-amd64/share/mylar/mylar/cherrypy/_cpdispatch.py", line 29, in __call__
return self.callable(*self.args, **self.kwargs)
File "/usr/pbi/mylar-amd64/share/mylar/mylar/mylar/webserve.py", line 1610, in pullist
repoll = self.manualpull(weeknumber=weekinfo['weeknumber'],year=weekinfo['year'])
File "/usr/pbi/mylar-amd64/share/mylar/mylar/mylar/webserve.py", line 1897, in manualpull
weeklypull.pullit()
File "/usr/pbi/mylar-amd64/share/mylar/mylar/mylar/weeklypull.py", line 359, in pullit
comicnm = issname[1]
IndexError: list index out of range
Running Development on Freenas.
User avatar
evilhero
Site Admin
Posts: 2876
Joined: Sat Apr 20, 2013 3:43 pm
Contact:

Re: IndexError: list index out of range

Post by evilhero »

This has already been addressed/fixed in git issue #2123 as it was a problem with the SQL backend.

Do a Recreate Pullist from the Weekly tab and everything will be well again. If you cannot get to the Weekly tab, just restart Mylar and it should reload everything from the get go again properly.
fallipus
Posts: 2
Joined: Fri Nov 30, 2018 12:49 pm

Re: IndexError: list index out of range

Post by fallipus »

I get what looks to be the same error as noted here (line details are off however so I could be wrong). My current Mylar version:

34e540c75f06b773e5c8f0c0605345e3911f48c7 (master)

I have tried to restart Mylar but I get this error when I click on This Week. Since only the error is shown, I can't manually recreate the pull list.

Is there a file or similar change I can make to wipe out any leftover details so it will get pulled properly on the next restart?

Error details:

****
500 Internal Server Error
The server encountered an unexpected condition which prevented it from fulfilling the request.

Traceback (most recent call last):
File "/app/mylar/lib/cherrypy/_cprequest.py", line 670, in respond
response.body = self.handler()
File "/app/mylar/lib/cherrypy/lib/encoding.py", line 217, in __call__
self.body = self.oldhandler(*args, **kwargs)
File "/app/mylar/lib/cherrypy/_cpdispatch.py", line 61, in __call__
return self.callable(*self.args, **self.kwargs)
File "/app/mylar/mylar/webserve.py", line 1610, in pullist
repoll = self.manualpull(weeknumber=weekinfo['weeknumber'],year=weekinfo['year'])
File "/app/mylar/mylar/webserve.py", line 1897, in manualpull
weeklypull.pullit()
File "/app/mylar/mylar/weeklypull.py", line 359, in pullit
comicnm = issname[1]
IndexError: list index out of range
User avatar
evilhero
Site Admin
Posts: 2876
Joined: Sat Apr 20, 2013 3:43 pm
Contact:

Re: IndexError: list index out of range

Post by evilhero »

Make sure your alt_pull value in the config.ini is set 2. It looks like you're defaulting back to the old method which relies on web scraping a different site and odds are that site has changed its layout. Everyone should be using alt_pull = 2.

For clarity, when the backend site goes offline (that alt_pull 2 uses), it will drop down to the next method which is the old web parser. The backend was offline for abit yesterday due to an sql problem, so it's possible it resaved the config value as a different value if it wasn't noticed prior.
fallipus
Posts: 2
Joined: Fri Nov 30, 2018 12:49 pm

Re: IndexError: list index out of range

Post by fallipus »

Yes all good now. Thank you very much!

I bet this is going to fix the weird issues I had with the Weekly List for some time. :)

I saw this setting change to Weekly Pull lists in old posts but I wasn't sure it was relevant. Should have just tried it.

Thanks again!
kcubor
Posts: 1
Joined: Sun Dec 09, 2018 11:48 pm

Re: IndexError: list index out of range

Post by kcubor »

I had this same issue, and hand to manually change the alt_pull setting in the ini file.

I am now wondering, what else isn't getting updated when I use the manual update? Is there a way to fully update to match the current version?

Barring that, how is the best way to un-install and then new fresh install?
User avatar
evilhero
Site Admin
Posts: 2876
Joined: Sat Apr 20, 2013 3:43 pm
Contact:

Re: IndexError: list index out of range

Post by evilhero »

kcubor wrote: Mon Dec 10, 2018 12:49 am I had this same issue, and hand to manually change the alt_pull setting in the ini file.

I am now wondering, what else isn't getting updated when I use the manual update? Is there a way to fully update to match the current version?

Barring that, how is the best way to un-install and then new fresh install?
It had actually nothing to do with an update. What ended up happening is pretty much what was described above - the backend site that the Mylar clients poll to retrieve the latest pull-list info was offline/non-responsive for a day or so. In getting back a null response from the backend site, the clients dropped down to an alternate pull list retrieval method that relies on web page parsing and obviously isn't working correctly due to layout changes. Then during this entire process, if a configuration update occured via a Save Config from the configuration page, it would save the non-working pullist retrieval method as the current polling method going forward so that when Mylar was restarted it would try to retrieve the pull using the web page parsing method and fail.

As far as the actual update of the entire mylar repo? Git clone is the best way to install from a clean source, and then let the in-app updater perform the updates as required.
Post Reply