Python Index Error: list index out of range
===

I'm attempting to get Python to populate the lists with the closing prices of 500 stocks. While the code seems to work fine for just a few stocks, the large amount poses a problem. Python keeps giving me the following error: "OneClose.append(Data[i][4]) IndexError: list index out of range." I'm not sure how to remedy this problem. No matter what I seem to enter in the range field (31 in this instance), the error persists.
  
    raw = open('C:\Model\Stocks\list.txt', 'r').read()
    stocks = raw.split('\n')

    for stock in stocks:
        Data = ystockquote.get_historical_prices(stock, '20120501', '20120716')
    
    # Create empty lists, quick and dirty
        OneClose = [ ]
        OneDate = [ ]
	 
    # Populate lists from downloaded data
        for i in range(1, 31):
            OneDate.append(Data[i][0])
            OneClose.append(Data[i][4])