Missing diacritical marks

Hi @Michael

I am following your code to create masked self paced reading task from the links:
Masked self-paced reading (google.com)

and

How do I get Moving window presentation in self paced reading task? - Coding - PsychoPy

but I am stuck in the following errors

Alert 4205:Python Syntax Error in ‘Begin Routine’ tab. See ’ for index, word in enumerate(textlist)
’ on line number 5 of the ‘Begin Routine’ tab.
For further info see 4205: Probable syntax error detected in your Python code — PsychoPy v2022.2.2
Alert 4205:Python Syntax Error in ‘Each Frame’ tab. See 'if’space’in keypresses:
’ on line number 5 of the ‘Each Frame’ tab.
For further info see 4205: Probable syntax error detected in your Python code — PsychoPy v2022.2.2

I am not sure what to change in the code to run the experiment.

The following code is at begin routine tab:
SentenceList = Sentence.Split(" ")
wordNumber = (-1)
def replaceWithdashes(textlist, currentWordNumber):
dashSentence = ‘’
for index, word in enumerate(textlist)
if index != currentWordNumber:
dashSentence = dashSentence + ‘–’ * len(word) + ‘–’
else:
dashSentence = dashSentence + word
return dashSentence

textbox.text = replaceWithdash(sentenceList, wordNumber)

Each frame
keypresses = event.getKeys()

if len(keypresses) > 0:

if’space’in keypresses:

wordNumber = wordNumber + 1
if wordNumber< len(sentenceList):
textbox.text = replaceWithdash(sentenceList, wordNumber)
else:
continueRoutine = FalseM

elif’esc’in keypresses:

core.quit()

I am trying to have the sentences displayed masked at the beginning ( the participant is able to see how many words the sentence includes with a space between words and how many characters each word is composed of) and when the participant presses spacebar the first word appears and the rest of the words stay masked. Whenever the participant presses spacebar the preceding word disappears and the following one appears.

Thank you in advance.