def _validate_values(compdict):
        """Fail if a value in the components dict is not a real number or None."""
        for name, value in six.iteritems(compdict):
            if value is not None and not isinstance(value, numbers.Real):
                raise ValueError('Invalid value {} for component {}, please provide ' \
                                 'a real number or None instead'.format(value, name))
Fail if a value in the components dict is not a real number or None.
stackoverflow/venv/lib/python3.6/site-packages/scrapy/utils/conf.py