import yaml


def yamlLoader(filepath):
    """
    Loads .yaml datafile into python dictionaries. (without comments)
    Input:
    `filepaht`(str): Path to .yaml datafile
    """
    try:
        with open(filepath, 'r') as file_descriptor:
            data = yaml.load(file_descriptor, Loader=yaml.FullLoader)
        return data
    except Exception as e:
        print('\nCould not correctly open the .yaml file')
        print('''The file needs to be formatted consistently. There needs to 
        be a space between key and value:  key:_value''')
        print('Error code:\n', e)