psychopy.org | Reference | Downloads | Github

Unexpected keyword argument 'mon' error when trying to use Monitor Center

II just installed psychopy (2021.2.3) and tried to run the following demo code.

from psychopy import visual
win = visual.Window([1024,768], mon='SonyG500')

I changed the mon keyword to match the name I assigned my monitor in the Monitor Center.

However, it gives the following output. It appears that the visual.Window is not expecting the mon keyword?

######## Running: C:\Users\user\Desktop\Projects\code\psychopy\test.py #########
pygame 1.9.6
Hello from the pygame community. https://www.pygame.org/contribute.html
Exception ignored in: <bound method Window.__del__ of <psychopy.visual.window.Window object at 0x0000025FB5C66860>>
Traceback (most recent call last):
  File "C:\Program Files\PsychoPy\lib\site-packages\psychopy\visual\window.py", line 615, in __del__
    if self._closed is False:
AttributeError: 'Window' object has no attribute '_closed'
Traceback (most recent call last):
  File "C:\Users\user\Desktop\Projects\code\psychopy\test.py", line 2, in <module>
    win = visual.Window([1024,768], mon='alienware')
TypeError: __init__() got an unexpected keyword argument 'mon'
##### Experiment ended. #####

What is going on and what am I doing wrong?