if obj.minItems and len(self) < obj.minItems:
raise errs.ValidationError('Array should be more than {0}, not {1}'.format(o.minItems, len(self)))
if obj.maxItems and len(self) > obj.maxItems:
raise errs.ValidationError('Array should be less than {0}, not {1}'.format(o.maxItems, len(self)))
In primitives lines 116 - 119
o is not defined and should be replaced to obj