From 8eb09f70d77e31fcc3fe1ff2fca80e099e5b3ccb Mon Sep 17 00:00:00 2001 From: Scott Sanderson Date: Fri, 18 Sep 2015 16:17:36 -0400 Subject: [PATCH] BUG: Don't crash when raising UnsupportedDataType. Before this was raising a KeyError on failure to format the message properly. --- zipline/modelling/factor/factor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zipline/modelling/factor/factor.py b/zipline/modelling/factor/factor.py index c09ac19d..b8eb0ca1 100644 --- a/zipline/modelling/factor/factor.py +++ b/zipline/modelling/factor/factor.py @@ -444,5 +444,5 @@ class CustomFactor(RequiredWindowLengthMixin, CustomTermMixin, Factor): def _validate(self): if self.dtype != float64: - raise UnsupportedDataType(self.dtype) + raise UnsupportedDataType(dtype=self.dtype) return super(CustomFactor, self)._validate()