VideoCache
Videocache is no longer in development.

[Resolved] list index out of range

by Anonymous on 23 Nov 2008

This error has been occurring since 1.2 (Right now, 1.5) in my squid cache.log

Exception in thread Thread-2:
Traceback (most recent call last):
  File "/usr/lib/python2.5/threading.py", line 486, in "bootstrap_inner
    self.run()
  File "/usr/share/youtube_cache/youtube_cache.py", line 763, in run
    download_scheduler()
  File "/usr/share/youtube_cache/youtube_cache.py", line 745, in download_scheduler
    log(format%(params[0], params[4], 'SCHEDULED', params[5], 'Video scheduled for download.'))
IndexError: list index out of range

Videos play fine but nothing gets cached after.

I noticed that the last modified for tmp was 2008-Nov-22 12:26:01
and youtube was 2008-Nov-22 12:25:09.

Attached is a snippet of logs related to those times.

3 Answers

by Kulbir Saini on 23 Nov 2008

Since you are a python bond yourself, can I request you to put a try except statement around that line and get the params printed in log so that I can get a clue about exact error. I'll catch that error in newer version anyway. Videos are not caching because scheduler itself crashed and once scheduler crashes, nothing will be scheduled, so nothing cached.

Thanks in advance :)

by chris on 7 Dec 2008

An update:

I've logged the error:

2008-12-03 17:51:35,811 INFO - - SCHEDULE_ERR - Could not schedule video for download.[]

and here's the code change that I've done:

log(format%('-', '-', 'SCHEDULE_ERR', '-', 'Could not schedule video for download.'+str(params)))

Hopefully, it can help fix this error.

by Kulbir Saini on 8 Dec 2008

Hey, I think this has been resolved in 1.6 . So, if you upgrade, you won't face this problem :)