HELPPPPPP! return obj(*args, **kwargs) TypeError: __init__() got an unexpected keyword argument 'win'

i am trying to make a program that shows words to participants and they have to recall the words everything works till the input section where it crashes and i get a " return obj(*args, **kwargs)
TypeError: init() got an unexpected keyword argument ‘win’"
can anyone help please this is for my dissertation!
import psychopy.visual
import psychopy.event
import psychopy.core
import random
import csv

win = psychopy.visual.Window(size=(800, 600), fullscr=False)

intro_text = “Welcome to the experiment! try to remember as many words as possibl. Press any key to start the experiment.”
intro_stim = psychopy.visual.TextStim(win=win, text=intro_text)
intro_stim.draw()
win.flip()
psychopy.event.waitKeys()

blank_stim = psychopy.visual.Rect(win=win, width=800, height=600, color=‘grey’)
blank_stim.draw()
win.flip()
psychopy.core.wait(1)

focal_point_stim = psychopy.visual.Circle(win=win, radius=50, color=‘black’)
focal_point_stim.draw()
win.flip()

words = [‘Family’, ‘mums’, ‘beat’, ‘shout’, ‘anger’, ‘marriage’, ‘divorce’, ‘dads’, ‘trauma’, ‘care’, ‘Dogs’, ‘happy’, ‘sad’, ‘red’, ‘Instagram’, ‘fashion’, ‘music’, ‘architecture’, ‘trains’, ‘party’]
random.shuffle(words)

for word in words:
word_stim = psychopy.visual.TextStim(win=win, text=word)
word_stim.draw()
win.flip()
psychopy.core.wait(1)

blank_stim.draw()
win.flip()
psychopy.core.wait(1)

response_text = "Please enter the words you remember, separated by a comma: "
response_stim = psychopy.visual.TextStim(win=win, text=response_text)
response_stim.draw()
win.flip()

text_input = psychopy.visual.TextStim(win=win, text=“”, pos=(0, -100), height=30)

while True:
text_input.draw()
win.flip()
response = psychopy.event.getKeys()
if response:
break

response = “,”.join(response)

with open(‘memory_data.csv’, ‘a’) as csvfile:
writer = csv.writer(csvfile)
writer.writerow([response])

win.close()

Everywhere in your code where you have “win=win”, replace it with just “win”. All of your objects (TextStim, Circle, Rect, etc.)

The reason is that “win” is a required argument, and required arguments you just put the value without the name of the argument. You only use the “argument=value” for optional arguments. The “unexpected keyword argument” is referring to that. There is no optional argument called ‘win’, it’s just required that you give it a window as the first argument.