Keyboard doesn't response in the second added routine

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

Hello, I’m using PsychoPy 1.90.1 to design a self-paced reading task. I’m doing it in the Builder. Everything worked perfectly well in the first routine (I restricted the key responses to left, right and space). But when I added the second routine, the keyboard doesn’t response anymore. The only active key is the ‘escape’, which I press to somehow leave the experiment. I don’t get any error messages. Do you any idea what might be the reason?

Hi @Armine_Garibyan, we need more information to help, could you explain more about your experiment, what you are doing in each routine, and what components you are using? For example, did you add a keyboard component to your second routine as well?

Sorry, sure.

In the first routine I have added a text. Each time a person sees a phrase, he/she presses SPACE which takes them to the next phase. Occasionally there are supposed to be yes/no comprehension questions. So, in the second routine I wanted to add the comprehension question and allow 2 keys ‘left’ and ‘right’. In the excel file, this was the second column. And as I said, the keyboard didn’t respond. Now I tried something which made it work (although I would like to know whether the is a better solution). Later, for the second routine I created a new separate excel file (not sheet) with one question only. And there it worked. However, since I am going to have 10 routines of text and 1o with comprehensive questions, I wouldn’t like to create 20 excel files. Is there a way to make it work with one excel file if I simply enter the routines in different columns? (That’s what I did when the keyboard didn’t respond in the second one).

In each of the routines I have 2 components only: text and keyboard.

Ok, so you have some text, the participant responds with spacebar, and this will take them to the next trial. You then have a comprehension question that appears at random? Or is it linked to a particular stimuli in the first routine? Also, is this the entire task?

The comprehension question refers back to the content of the text in the previous routine. As soon as the participant answer the questions, it should take him/her to the next routine (3rd) which will be again a portion of text (demonstrated phrase-by-phrase). All in all, portions of text will alternate with comprehension questions 10 times, and that will be the whole experiment.

Could this help? KeyError: u’\xa7’

Do you have any accented characters or symbols in your text?

No, I don’t

Sorry I cannot solve this based on the information, would you mind uploading your psyexp file and excel file so I can take a look?

Sure, here they are.SPR EN.xlsx (12.4 KB)
SPRtrial.psyexp (33.0 KB)

Ok, I think the way the task is designed could be improved, it is not the usual practice to have separate routines for trials. How about the attached? It will require some editing of your conditions file. Basically, you have your entire sentence in one Excel cell, where lines are separated by a ‘/’. We use a code component to divide up the sentences into a list of sentence parts, where the sentence is split at points where ‘/’ is found, and then each part of the sentence is presented in the text component. Every time a space is recorded, the next part of the sentence is taken from the list of sentence parts. When all parts are viewed, the question is asked in the next routine. The correct answer is defined in the Excel file column called ‘corrAns’ and this is used on the keyboard component in the question routine. You would then loop through to the next trial, or a sentence and question.

newSPR.xlsx (7.9 KB)
newSPR.psyexp (9.9 KB)

Thank you very much for the help! Now I know how to proceed!