import random


def gen_lister(minLength, maxLength):
    """Generate a list of 1s, with a random length between the given ranges"""
    if type(minLength) != int:
        raise OSError
    if type(maxLength) != int:
        raise OSError
    listLength = random.randint(minLength, maxLength)
    listerList = []
    count = 0
    while count != listLength:
        listerList.append(1)
        count = count + 1
    return listerList