IndexError: list index out of range

Issue #65 resolved
Pavel Vasilyev created an issue
$ ./grabber.py
* 2) SBS
* 2) Genre
* 14) Sport
* 1025) Tour De France: Stage Replay S2016 Ep21

Traceback (most recent call last):
  File "/media/disk/webdl/grabber.py", line 55, in <module>
    main()
  File "/media/disk/webdl/grabber.py", line 48, in main
    if not n.download():
  File "/media/disk/webdl/sbs.py", line 29, in download
    video = doc.xpath("//smil:video", namespaces=NS)[0]
IndexError: list index out of range

Comments (7)

  1. delx repo owner

    I've no idea what causes this and I haven't been able to reproduce it. However I've put in some extra error checking so you'll at least get a friendlier error message.

  2. Pavel Vasilyev reporter
    $ chown pavel ./ -R
    $ pavel@amd64:/media/disk/webdl$ ./grabber.py 
    Traceback (most recent call last):
      File "./grabber.py", line 3, in <module>
        from common import load_root_node, natural_sort
      File "/media/disk/webdl/common.py", line 10, in <module>
        import requests_cache
    ImportError: No module named 'requests_cache'
    
  3. delx repo owner

    requests-cache is in requirements.txt. There are in instructions in the readme on installing it with pip or apt-get.

  4. Pavel Vasilyev reporter
    600) Replay: La Vuelta 2017 Stage 12
    ...
    Choose> 600
    Traceback (most recent call last):
      File "/media/disk/webdl/grabber.py", line 55, in <module>
        main()
      File "/media/disk/webdl/grabber.py", line 48, in main
        if not n.download():
      File "/media/disk/webdl/sbs.py", line 29, in download
        video = doc.xpath("//smil:video", namespaces=NS)[0]
    IndexError: list index out of range
    
  5. Pavel Vasilyev reporter

    2-nd bud

    Choose> 600
    Traceback (most recent call last):
      File "/media/disk/webdl/grabber.py", line 55, in <module>
        main()
      File "/media/disk/webdl/grabber.py", line 48, in main
        if not n.download():
      File "/media/disk/webdl/sbs.py", line 29, in download
        raise Exception("Unsupported video %s: %s" % (self.video_id, self.title))
    Exception: Unsupported video 1027036739680: Replay: La Vuelta 2017 Stage 12
    
  6. Log in to comment