'Loads the config file from disk, validates and activates it.
:raises: `ValueError` if there is a problem loading the config file'

def load_config(self, output_to_console=True, config_file_hash=None):

    fire_event(u'manager.before_config_load', self)
    with io.open(self.config_path, u'r', encoding=u'utf-8') as f:
        try:
            raw_config = f.read()
        except UnicodeDecodeError:
            log.critical(u'Config    file    must    be    UTF-8    encoded.')
            raise ValueError(u'Config    file    is    not    UTF-8    encoded')
    try:
        self.config_file_hash = (config_file_hash or self.hash_config())
        config = (yaml.safe_load(raw_config) or {})
    except Exception as e:
        msg = str(e).replace(u'\n', u'    ')
        msg = u'    '.join(msg.split())
        log.critical(msg, exc_info=False)
        if output_to_console:
            print(u'')
            print((u'-' * 79))
            print(u'    Malformed    configuration    file    (check    messages    above).    Common    reasons:')
            print((u'-' * 79))
            print(u'')
            print(u'    o    Indentation    error')
            print(u'    o    Missing    :    from    end    of    the    line')
            print(u'    o    Non    ASCII    characters    (use    UTF8)')
            print(u"    o    If    text    contains    any    of    :[]{}%    characters    it    must    be    single-quoted    (eg.    value{1}    should    be    'value{1}')\n")
            if (hasattr(e, u'problem') and hasattr(e, u'context_mark') and hasattr(e, u'problem_mark')):
                lines = 0
                if (e.problem is not None):
                    print((u'    Reason:    %s\n' % e.problem))
                    if (e.problem == u'mapping    values    are    not    allowed    here'):
                        print(u'    ---->    MOST    LIKELY    REASON:    Missing    :    from    end    of    the    line!')
                        print(u'')
                if (e.context_mark is not None):
                    print((u'    Check    configuration    near    line    %s,    column    %s' % (e.context_mark.line, e.context_mark.column)))
                    lines += 1
                if (e.problem_mark is not None):
                    print((u'    Check    configuration    near    line    %s,    column    %s' % (e.problem_mark.line, e.problem_mark.column)))
                    lines += 1
                if lines:
                    print(u'')
                if (lines == 1):
                    print(u'    Fault    is    almost    always    in    this    or    previous    line\n')
                if (lines == 2):
                    print(u'    Fault    is    almost    always    in    one    of    these    lines    or    previous    ones\n')
        if (self.options.debug or (not output_to_console)):
            raise
        raise ValueError(u'Config    file    is    not    valid    YAML')
    log.debug((u'config_name:    %s' % self.config_name))
    log.debug((u'config_base:    %s' % self.config_base))
    self.update_config(config)
