Python novice here (sorry if this is a dumb question)! I'm currently using a for loop to download and manipulate data. Unfortunately, I occasionally run into brief network issues that cause portions of the loop to fail.

Originally, I was doing something like this:

```
# Import Modules
import fix_yahoo_finance as yf
import pandas as pd
from stockstats import StockDataFrame as sdf

# Stock Tickers to Gather Data For - in my full code I have thousands of tickers
Ticker = ['MSFT','SPY','GOOG']

# Data Start and End Data
Data_Start_Date = '2017-03-01'
Data_End_Date = '2017-06-01'

# Create Data List to Append
DataList = pd.DataFrame([])

# Initialize Loop
for i in Ticker:
    # Download Data
    data = yf.download(i, Data_Start_Date, Data_End_Date)
    # Create StockDataFrame
    stock_df = sdf.retype(data)
    # Calculate RSI
    data['rsi'] = stock_df['rsi_14']
    DataList.append(pd.DataFrame(data))

DataList.to_csv('DataList.csv',header=True,index=True)

```

With that basic layout, whenever I had a network error, it caused the entire program to halt and spit out an error.

I did some research and tried modifying the 'for loop' to following:

```
for i in Ticker:
  try:
    # Download Data
    data = yf.download(i, Data_Start_Date, Data_End_Date)
    # Create StockDataFrame
    stock_df = sdf.retype(data)
    # Calculate RSI
    data['rsi'] = stock_df['rsi_14']
    DataList.append(pd.DataFrame(data))
  except:
    continue

```

With this, the code always ran without issue, but whenever I encountered a network error, it skipped all the tickers it was on (failed to download their data).

I want this to download the data for each ticker once. If it fails, I want it to try again until it succeeds once and then move on to the next ticker. I tried using `while True` and variations of it, but it caused the loop to download the same ticker multiple times!

Any help or advice is greatly appreciated! Thank you!