Monitor specification not found

When running my script, I get the following warning message:

WARNING Monitor specification not found. Creating a temporary one...

However, I specified monitor setting using monitors.Monitor and passed them as argument for the window in my experiment.

# Monitor
widthPix = 1920 # screen width in px
heightPix = 1080 # screen height in px
monitorwidth = 53.1 # monitor width in cm
viewdist = 60. # viewing distance in cm
monitorname = 'iiyama'
scrn = 0 # 0 to use main screen, 1 to use external screen
mon = monitors.Monitor(monitorname, width=monitorwidth, distance=viewdist)
mon.setSizePix((widthPix, heightPix))

# Initialize window
win = visual.Window(
    monitor=mon, 
    size=(widthPix,heightPix),
    color='Gray',
    colorSpace='rgb',
    units='deg',
    screen=scrn,
    allowGUI=False,
    fullscr=True)

When running the script, the warning appears at the first `win.flip()’ call.
The warning is not fatal, but I was wondering if I forgot to specify anything in the monitor settings…?

Thanks,
(Windows 10 - Psychopy 2.7.15 - Psychopy 1.90.1)

I think that message is based on the monitor not having any stored calibrations.

1 Like

PsychoPy always gives a warning if you create a monitor with a name that it doesn’t recognise. The warning is actually coming up before you get to the Window class, in the line

mon = monitors.Monitor(monitorname, width=monitorwidth, distance=viewdist)

The feature is there to alert you to the fact that the calibration file wasn’t found (e.g. you might have saved it and someone has accidentally deleted it).

You could either ignore the warning because it isn’t relevant to you the way you’re using Monitor, or you could save your monitor:

mon.save()

Having saved it you’ll see a json file (or calib file or both, depending on which version of PsychoPy you’re using) in your monitors folder with all these details saved so you don’t have to write them in each script. Then, if you change the monitor you can update them all in one go as well!

2 Likes