From cd98b524549509cb67b77bfdb9aa819e98e40f64 Mon Sep 17 00:00:00 2001 From: Jonathan Kamens Date: Mon, 4 May 2015 10:33:47 -0400 Subject: [PATCH] BUG: Correct method for finding security lists directory The correct thing to look at to figure out where the root of the zipline tree is, is `zipline.__file__`, not `zipline.__path__`. The latter could contain multiple directories in it, and is not intended to be `os.path.join()`ed as the previous code was doing. --- zipline/utils/security_list.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zipline/utils/security_list.py b/zipline/utils/security_list.py index 0cb24a4b..341b2135 100644 --- a/zipline/utils/security_list.py +++ b/zipline/utils/security_list.py @@ -8,7 +8,7 @@ import zipline DATE_FORMAT = "%Y%m%d" -zipline_dir = os.path.join(*zipline.__path__) +zipline_dir = os.path.dirname(zipline.__file__) SECURITY_LISTS_DIR = os.path.join(zipline_dir, 'resources', 'security_lists')