PsychoPy version 2021. 1.4)
What are you trying to achieve?:
I have constructed a fairly simple experiment involving the presentation of text stimuli (single words) with a rating task. The experiment has X number of trials per block for a total of 3 blocks. Everything is now working but I recently changed the text stimuli from English words to Thai words (in the Excel file) and then came across a coding problem. The experiment starts ok but stops just before the first trial. Everything works perfectly fine when I use English words instead.
I saw others have encountered presentation problems with other languages. Does anyone know a simple solution (I’m still quite a beginner).
What did you try to make it work?:
It works with English words but not with Thai words. With Thai words it stops the experiment.
I tried using the Textbox component as an alternative and it displays square symbols or squares and question makrs when using Thai words. Seems like it could be a font or encoding issue, but not sure how to fix this.
What specifically went wrong when you tried that?:
This is the message I get (partial message) when the experiment stops working (using the text box component to display the stimuli):
File “C:\Program Files\PsychoPy3\lib\site-packages\pyglet\font\base.py”, line 394, in get_glyphs
self.glyphs[c] = glyph_renderer.render(c)
File “C:\Program Files\PsychoPy3\lib\site-packages\pyglet\font\win32.py”, line 432, in render
ord(text), ord(text), byref(abc)):
TypeError: ord() expected a character, but string of length 2 found
Experiment ended.
Hopefully there’s a simple solution.
Ben