Windows 10
PsychoPy version V2020.1.3
What are you trying to achieve?:
I am trying to set the text to a word based on a counter.
Specifically, at the beginning I load some words from a spreadsheet (like here), into “wordlist” then I also set
> wordcounter = 0
(The column that I load into wordlist is called “word”)
Then I try to set the text by using
> text.setText(wordlist[word[wordcounter]])
What specifically went wrong when you tried that?:
The experiment runner keeps on giving me the error message, no matter what variation I try:
text.setText(wordlist[word[1]])
TypeError: list indices must be integers or slices, not str
text.setText(wordlist[word[wordcounter]])
TypeError: list indices must be integers or slices, not str
text.setText(wordlist[word])
TypeError: list indices must be integers or slices, not str