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!