diff --git a/pysaliency/datasets.py b/pysaliency/datasets.py index a158c12..856a460 100644 --- a/pysaliency/datasets.py +++ b/pysaliency/datasets.py @@ -476,8 +476,8 @@ def __init__(self, train_xs, train_ys, train_ts, train_ns, train_subjects, scanp if attributes is None: attributes = {} - else: - warnings.warn("don't use attributes for FixationTrains, use scanpath_attributes or scanpath_fixation_attributes instead!") + elif attributes: + warnings.warn("don't use attributes for FixationTrains, use scanpath_attributes or scanpath_fixation_attributes instead!", stacklevel=2) self.auto_attributes = []