From 50800a986336feffa634734d6efce03599423140 Mon Sep 17 00:00:00 2001 From: Eddie Hebert Date: Mon, 18 Nov 2013 20:37:45 -0500 Subject: [PATCH] BUG: Fix data cache filepath on Windows. Prevent the ':' char, generated by converting a datetime to a string, from creating on incompatible filepath for Windows. --- zipline/data/loader.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zipline/data/loader.py b/zipline/data/loader.py index 74cb2940..98d573df 100644 --- a/zipline/data/loader.py +++ b/zipline/data/loader.py @@ -260,7 +260,7 @@ must specify stocks or indexes""" cache_filename = "{stock}-{start}-{end}.csv".format( stock=stock, start=start, - end=end) + end=end).replace(':', '-') cache_filepath = get_cache_filepath(cache_filename) if os.path.exists(cache_filepath): stkd = pd.DataFrame.from_csv(cache_filepath)