Skip to content

Commit

Permalink
Added exception printing for ALFRED/FRED
Browse files Browse the repository at this point in the history
  • Loading branch information
saeedamen committed Sep 20, 2018
1 parent 8cd2772 commit 88d70b8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions findatapy/market/datavendorweb.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,9 +299,9 @@ def download_daily(self, market_data_request):
market_data_request.finish_date, data_frame))

break
except:
except Exception as e:
trials = trials + 1
logger.info("Attempting... " + str(trials) + " request to download from ALFRED/FRED")
logger.info("Attempting... " + str(trials) + " request to download from ALFRED/FRED" + str(e))

if trials == 5:
logger.error("Couldn't download from ALFRED/FRED after several attempts!")
Expand Down Expand Up @@ -2207,7 +2207,9 @@ def download(self, market_data_request):

########################################################################################################################

import fxcmpy
try:
import fxcmpy
except: pass

class DataVendorFXCMPY(DataVendor):
"""Reads in data from FXCM data using fxcmpy into findatapy library. Can be used for minute or daily data. For
Expand Down

0 comments on commit 88d70b8

Please sign in to comment.