Self-paced reading setting for different number of words (sentences)

If this template helps then use it. If not then just delete and start from scratch.

OS (e.g. Win10): Win10
PsychoPy version (e.g. 1.84.x): v2022.2.2
Standard Standalone? (y/n) y
What are you trying to achieve?: & What did you try to make it work?: & What specifically went wrong when you tried that?: → all answered together.

Hello :slight_smile:

What I wish to make seemed quite simple, but it’s turning out to be very complicated…

This is a sample of the sentences that I wish to present using Psychopy.
There are total of 90 rows (a combination of “context” + “1 sentence → separated in to 7 word columns”) in a single excel sheet.

The context should be read “self-paced”, and the words are timed (each 0.4s).

So I simply created the experiment as followed:

Interestingly, the experiment runs without any errors…!
BUT my problem here is, that because the number of the words are not equal for each rows,
a screen with “Any text with line blanks” appears for the rows that misses any word columns.

Can anyone please help me with this…?

I’ve been doing a lot of searching on google (incl. this forum) regarding my current problem, but I couldn’t find an answer…!

Thank you very much for your help :smiley:

Hi @MIJUNG,

in “Begin routine” you could insert a code that skips the routine if the respective column is empty in this row. It could work like this:

if word1 == "":
    continueRoutine = False

But I am not 100% sure that empty cells are treated as "". So you might have to adapt this.

Another more elegant solution would be to have the sentences as arrays in just one column and then have just one routine that loops through the words of the sentence.

Hello @ajus !

Thank you very much for your reply.
It worked! (80%) :smiley: :smiley:

The empty cells were not treated as “”, so I just added the word “blank” into the empty cells and
coded “blank” :slight_smile:

Thank you so much for your help!