I'm writing a script that downloads files for web design, and this line produces
Traceback (most recent call last):
File "bootlace.py", line 60, in <module>
download(data['jquery'], 'Downloading jquery. (File size %s)', 'js/')
File "bootlace.py", line 11, in download
file_size = int(meta.getheaders("Content-Length")[0])
IndexError: list index out of range
That line is repeated almost exactly further up the page. The JSON that is loaded into the data array is:
{
...
"jquery": "http://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js",
...
}
And as you can see, jquery exists in that json. So what is happening?