diff --git a/algo/curve_anomaly/curve_utils.py b/algo/curve_anomaly/curve_utils.py index ca6592c..694b7d8 100644 --- a/algo/curve_anomaly/curve_utils.py +++ b/algo/curve_anomaly/curve_utils.py @@ -33,7 +33,11 @@ def load_data(filename_dict, data_list, anomalies): print("Data buffer could not be loaded! This might be caused by not having any data in the buffer yet.") if os.path.exists(anomalies_path): - with open(anomalies_path, 'rb') as f: - anomalies = pickle.load(f) + try: + with open(anomalies_path, 'rb') as f: + anomalies = pickle.load(f) + except EOFError: + print("Could not load the historic anomalies!") + return data_list, anomalies \ No newline at end of file