| Reference | Downloads | Github

TextStim text appears with a highlight, making it unreadable (or rendered incorrectly)


I am programming a discrimination task experiment using Spyder which should give dynamic feedback every x trials about participant’s accuracy. I use a TextStim object to display a feedback screen, but the text doesn’t seem to appear properly (see attached image).

The confusing thing is, the first ever screen to be displayed after I restart psychopy generally looks just fine, but the subsequent ones look just as the one I show in the attached image.

I tried changing units to ‘deg’,‘cms’,‘norm’.
I changed the font, I tried different sizes, I tried changing the colors, nothing seems to work.

I also defined the units from my Window object, and tried changing them as well, but that didn’t work either. At this point I ran out of options to try. It seems to me that it may have something to do with clearing the buffer, since it shows just fine when I restart Spyder and display it for the first time.

Any recommendation would be highly appreciated!

Thank you,

What happens when you run the script within the standalone version of the PsychoPy app, rather than from within your own Python installation? This will help isolate if issues are specific to the dependencies in your set-up.

Lastly, Spyder is good for developing scripts, but it is probably best not to use it to run your experiments in production. If you want to run the experiment for real, do it from the command line (or from within the standalone app).

Thank you for the quick reply!

When I ran it from the standalone PsychoPy app, the same thing happened. The very first text is just fine, and the rest is a highlight, or a bar.

Oddly enough, this time the text appeared in the center of the screen (see attached).

This is all very strange, have never seen anything like this reported before.

Firstly just try running one of PsychoPy’s built-in demo files from the Coder view’s “demo” menu (the text stimulus one in particular) and see what happens.

If that doesn’t give you a hint as to the issue with your script, then you should create the smallest possible reproducible example and post it here, along with details of your set-up.