diff --git a/brain/validator/dataset.py b/brain/validator/dataset.py index c845157c5..efb3b64f3 100644 --- a/brain/validator/dataset.py +++ b/brain/validator/dataset.py @@ -8,6 +8,7 @@ from voluptuous import Schema, Required, All, Any, Length from voluptuous.humanize import validate_with_humanized_errors +from six import string_types class Validator(object): @@ -38,9 +39,9 @@ def validate_classification(self, data): current_errors = [] schema = Schema({ - Required('dependent-variable'): All(unicode, Length(min=1)), + Required('dependent-variable'): All(string_types, Length(min=1)), Required('independent-variables'): [{ - Required(All(unicode, Length(min=1))): Any(int, float), + Required(All(string_types, Length(min=1))): Any(int, float), }], }) @@ -69,7 +70,7 @@ def validate_regression(self, data): schema = Schema({ Required('dependent-variable'): Any(int, float), Required('independent-variables'): [{ - Required(All(unicode, Length(min=1))): Any(int, float), + Required(All(string_types, Length(min=1))): Any(int, float), }], })