From 88d70b8353bb5248e69405b7cb628738f3eba5e1 Mon Sep 17 00:00:00 2001 From: saeedamen Date: Thu, 20 Sep 2018 14:04:22 +0100 Subject: [PATCH] Added exception printing for ALFRED/FRED --- findatapy/market/datavendorweb.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/findatapy/market/datavendorweb.py b/findatapy/market/datavendorweb.py index 27240cc..f9f3ec0 100644 --- a/findatapy/market/datavendorweb.py +++ b/findatapy/market/datavendorweb.py @@ -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!") @@ -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