From 5bddf32062efbc29d282ab97506f869859c2189f Mon Sep 17 00:00:00 2001 From: Scott Sanderson Date: Tue, 3 Nov 2015 15:58:02 -0500 Subject: [PATCH] BUG: Raise if we fail to symbol map a Frame/Panel. Previously, we just warned here, but then we'd fail immediately trying to write the found values into an index that's too long. --- zipline/assets/assets.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/zipline/assets/assets.py b/zipline/assets/assets.py index 282db052..69a1cc17 100644 --- a/zipline/assets/assets.py +++ b/zipline/assets/assets.py @@ -15,7 +15,6 @@ from abc import ABCMeta from numbers import Integral from operator import itemgetter -import warnings from logbook import Logger import numpy as np @@ -720,9 +719,8 @@ class AssetFinder(object): self._lookup_generic_scalar(identifier, as_of_date, matches, missing) - # Handle missing assets - if len(missing) > 0: - warnings.warn("Missing assets for identifiers: %s" % missing) + if missing: + raise ValueError("Missing assets for identifiers: %s" % missing) # Return a list of the sids of the found assets return [asset.sid for asset in matches]