window.backgroundImage

I get an error when trying to define the window.backgroundImage property. The image I want to use is a checkerboard I have created, but I assume the nature of the image is not the issue (I tried this with a 2D numpy array describing the checkerboard, and a checkerboard image generated with visual.imageStim). The code snippet and error is pasted below. What am I missing here?

win = visual.Window(
size=winsize, fullscr=True, screen=0,
winType=‘pyglet’, allowStencil=False,
monitor=‘EV2456’, color=[-1,-1,-1], colorSpace=‘rgb’,
units=‘deg’, backgroundImage=checkerboard, backgroundFit=‘None’)

Error message:

in win = visual.Window(
TypeError: init() got an unexpected keyword argument ‘backgroundImage’

Is checkerboard an image object? I think it should be an image file name.

I tried a numpy matrix and an image object as per the documentation of visual.window ("Background image for the window, can be either a visual.ImageStim object or anything which could be passed to visual.ImageStim.image to create one. "). If this needs to be a file, then it’s not practical in my case as I need to be able to modify the background during the experiment. My current solution is to draw the checkerboard as an imageStim object but I would have liked to use the backgroundImage property for ease of use.