Print instruction page in French
My task's instruction page is in Canadian French. As you know French has some accent such as (à,é,l'association..etc).
I used the code below to display instruction page:
import expyriment
exp = expyriment.design.Experiment(name="semantic task ")
expyriment.control.initialize(exp)
instruction = expyriment.stimuli.TextLine(text=" "Nous allons faire une tâche d'association sémantique ")
instruction.preload()
expyriment.control.start()
instruction.present()
exp.clock.wait(4000)
expyriment.control.end()
It give me error blow:
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 6: ordinal not in range(128).
I have 2 questions regarding this problem:
1) How can I print a French sentence in the instruction page? for example, the text as you can see in the French sentence we have d'association sémantique ". Unfortunately, Python editor considers d' as a beginning of quotation and end of the semantique" as the second quotation and that's why I have syntax error all the time. Do you have any solution for this problem?
2) I wanted to give infinite time to the participant for instruction page and say "if you read and understand instruction page press any key to continue". How can I set press any key to continue in expyriment and how I can give infinite time to the participant.
Thank you very much for your comment in advance.
Comments
Hi Juliette,
1) Please see our documentation on this: http://docs.expyriment.org/Unicode.html
2)
exp.keyboard.wait()
will wait for any keyHi Florian,
Thank you for your comment.
I have one instruction page for the participant ( 10 lines of text) But using commad expyriment.stimuli.TextLine It prints all the 10 lines text in one very very long line. In order to solve this problem I break out my sentences in few smaller lines as you can see below:
But it still prints instruction lines of 1 and 2 in one long line instead of printing first text on the first line and prints the second text in the second line. Do you have any solution how can I have text1 \n (next line) text 2 and so on, please?
Hi Juliette,
please see the documentation for TextBox and TextScreen for multi-line text.
Best,
Florian