Help with Monitor Specification Not Found

Hi everyone!

I am attempting to code an experimental set up for a visual latency task. my code worked well up until recently, but it has abruptly been exiting with the above error code. My monitor specifications match my coded specs, I cant seem to figure out the problem so any help would be appreciated.

Here is my code to set up the window/monitor:
def setupWindow(expInfo=None, win=None):
Setup the Window

expInfo : dict
    Information about this experiment, created by the `setupExpInfo` function.
win : psychopy.visual.Window
    Window to setup - leave as None to create a new window.

    Window in which to run this experiment.
if win is None:
    # if not given a window to setup, make one
    win = visual.Window(
        size=(1024, 768), fullscr=True, screen=0,
        winType='pyglet', allowStencil=False,
        monitor='testMonitor', color=[0,0,0], colorSpace='rgb',
        backgroundImage='', backgroundFit='none',
        blendMode='avg', useFBO=True,
    if expInfo is not None:
        # store frame rate of monitor if we can measure it
        expInfo['frameRate'] = win.getActualFrameRate()
    # if we have a window, just set the attributes which are safe to set
    win.color = [0,0,0]
    win.colorSpace = 'rgb'
    win.backgroundImage = ''
    win.backgroundFit = 'none'
    win.units = 'height'
win.mouseVisible = False
return win

thank you!