Problems with the text component

I’m trying to use the beta text component.

I followed the youtube tutorial and double checked multiple times so make sure what I did was identical.

In the first loop I was able to edit the text component and type in an answer, in the the second loop I wasn’t able to edit it.

I tried adding a second routine of the text component after the first, and set it so they were in a loop that repeated two times, to see what happend.

First loop of first routine worked. First loop of second routine let me edit the text but put the letters in unusual places that changed each time I pressed space. For both of the second loop I couldn’t edit the text box.

I included the the two routines in a loop to show what happened.

1.4695 WARNING We strongly recommend you activate the PTB sound engine in PsychoPy prefs as the preferred audio engine. Its timing is vastly superior. Your prefs are currently set to use [‘sounddevice’, ‘PTB’, ‘pyo’, ‘pygame’] (in that order).
10.8498 WARNING User requested fullscreen with size [1024 768], but screen is actually [1600, 900]. Using actual size
14.4202 WARNING Couldn’t measure a consistent frame rate.

  • Is your graphics card set to sync to vertical blank?
  • Are you running other processes on your computer?

14.4221 EXP Created window1 = Window(allowGUI=False, allowStencil=False, args=UNKNOWN, autoLog=True, bitsMode=UNKNOWN, blendMode=‘avg’, bpc=(8, 8, 8), color=array([0., 0., 0.]), colorSpace=‘rgb’, depthBits=8, fullscr=<method-wrapper ‘getattribute’ of attributeSetter object at 0x000001CF1D68F400>, gamma=None, gammaErrorPolicy=‘raise’, kwargs=UNKNOWN, lms=UNKNOWN, monitor=<psychopy.monitors.calibTools.Monitor object at 0x000001CF1D59EBE0>, multiSample=False, name=‘window1’, numSamples=2, pos=[0.0, 0.0], screen=0, size=array([1600, 900]), stencilBits=0, stereo=False, units=‘height’, useFBO=True, useRetina=False, viewOri=0.0, viewPos=None, viewScale=None, waitBlanking=True, winType=‘pyglet’)
14.4241 EXP window1: mouseVisible = True
14.4242 EXP window1: recordFrameIntervals = False
14.6517 EXP window1: recordFrameIntervals = True
14.7020 WARNING t of last frame was 25.52ms (=1/39)
14.7244 WARNING t of last frame was 22.42ms (=1/44)
14.7523 WARNING t of last frame was 27.89ms (=1/35)
14.7738 WARNING t of last frame was 21.56ms (=1/46)
14.8039 WARNING Multiple dropped frames have occurred - I’ll stop bothering you about them!
17.0257 WARNING Couldn’t measure a consistent frame rate.

  • Is your graphics card set to sync to vertical blank?
  • Are you running other processes on your computer?

17.2788 ERROR Unknown colorSpace: named
17.4398 EXP Created endButton = TextStim(class=<class ‘psychopy.visual.text.TextStim’>, alignHoriz=method-wrapper(…), alignText=‘center’, alignVert=method-wrapper(…), anchorHoriz=‘center’, anchorVert=‘center’, antialias=True, autoLog=True, bold=False, color=‘white’, colorSpace=‘named’, contrast=1.0, depth=-1.0, flipHoriz=False, flipVert=False, font=‘Arial’, fontFiles=[], height=0.1, italic=False, languageStyle=‘LTR’, name=‘endButton’, opacity=1.0, ori=0, pos=array([ 0. , -0.4]), rgb=array([255., 255., 255.]), text=‘Click here’, units=‘height’, win=Window(…), wrapWidth=1)
17.4399 EXP window1: mouseVisible = True
17.4421 ERROR Unknown colorSpace: named
17.4477 EXP Created endbutton2 = TextStim(class=<class ‘psychopy.visual.text.TextStim’>, alignHoriz=method-wrapper(…), alignText=‘center’, alignVert=method-wrapper(…), anchorHoriz=‘center’, anchorVert=‘center’, antialias=True, autoLog=True, bold=False, color=‘white’, colorSpace=‘named’, contrast=1.0, depth=-1.0, flipHoriz=False, flipVert=False, font=‘Arial’, fontFiles=[], height=0.1, italic=False, languageStyle=‘LTR’, name=‘endbutton2’, opacity=1.0, ori=0, pos=array([ 0. , -0.4]), rgb=array([255., 255., 255.]), text=‘click here’, units=‘height’, win=Window(…), wrapWidth=1)
17.4478 EXP window1: mouseVisible = True
17.4482 EXP Created sequence: random, trialTypes=1, nReps=2, seed=None
17.4485 EXP New trial (rep=0, index=0): None
17.5256 EXP textbox: autoLog = True
17.5256 EXP textbox_2: autoLog = True
17.5256 EXP textbox: text = ‘Type a response here’
17.5256 EXP textbox: autoDraw = True
17.5256 EXP endButton: autoDraw = True
19.3897 DATA Keypress: right
19.5986 DATA Keypress: right
19.7673 DATA Keypress: right
19.9063 DATA Keypress: right
20.1393 DATA Keypress: right
20.3800 DATA Keypress: right
20.5405 DATA Keypress: right
21.3753 DATA Keypress: right
21.9437 DATA Keypress: backspace
21.9679 EXP textbox: text = ‘Type a response her’
22.0921 DATA Keypress: backspace
22.1229 EXP textbox: text = ‘Type a response he’
22.2271 DATA Keypress: backspace
22.2389 EXP textbox: text = ‘Type a response h’
22.3715 DATA Keypress: backspace
22.3963 EXP textbox: text = ‘Type a response ’
22.5071 DATA Keypress: backspace
22.5267 EXP textbox: text = ‘Type a response’
22.6080 DATA Keypress: backspace
22.6253 EXP textbox: text = ‘Type a respons’
22.7388 DATA Keypress: backspace
22.7545 EXP textbox: text = ‘Type a respon’
22.8712 DATA Keypress: backspace
22.8922 EXP textbox: text = ‘Type a respo’
22.9913 DATA Keypress: backspace
23.0126 EXP textbox: text = ‘Type a resp’
23.1280 DATA Keypress: backspace
23.1449 EXP textbox: text = ‘Type a res’
23.2622 DATA Keypress: backspace
23.2776 EXP textbox: text = ‘Type a re’
23.4144 DATA Keypress: backspace
23.4420 EXP textbox: text = ‘Type a r’
23.5449 DATA Keypress: backspace
23.5562 EXP textbox: text = ‘Type a ’
23.6912 DATA Keypress: backspace
23.7125 EXP textbox: text = ‘Type a’
23.8307 DATA Keypress: backspace
23.8428 EXP textbox: text = ‘Type ’
23.9864 DATA Keypress: backspace
24.0119 EXP textbox: text = ‘Type’
24.2151 DATA Keypress: backspace
24.2266 EXP textbox: text = ‘Typ’
24.4154 DATA Keypress: backspace
24.4262 EXP textbox: text = ‘Ty’
24.5841 DATA Keypress: backspace
24.5951 EXP textbox: text = ‘T’
25.2618 DATA Keypress: backspace
25.2733 EXP textbox: text = ‘’
25.6940 DATA Keypress: 1
25.7183 EXP textbox: text = ‘1’
26.0872 DATA Keypress: s
26.1154 EXP textbox: text = ‘1s’
26.2894 DATA Keypress: t
26.3082 EXP textbox: text = ‘1st’
26.5397 DATA Keypress: space
26.5541 EXP textbox: text = ‘1st ’
26.7480 DATA Keypress: r
26.7594 EXP textbox: text = ‘1st r’
26.9381 DATA Keypress: e
26.9551 EXP textbox: text = ‘1st re’
27.1439 DATA Keypress: s
27.1645 EXP textbox: text = ‘1st res’
27.4651 DATA Keypress: p
27.4763 EXP textbox: text = ‘1st resp’
27.6332 DATA Keypress: o
27.6475 EXP textbox: text = ‘1st respo’
27.8688 DATA Keypress: n
27.8870 EXP textbox: text = ‘1st respon’
28.0128 DATA Keypress: s
28.0292 EXP textbox: text = ‘1st respons’
28.1673 DATA Keypress: e
28.1834 EXP textbox: text = ‘1st response’
29.6540 DATA Mouse: Left button down, pos=(814,66)
29.6894 EXP textbox: autoDraw = False
29.6894 EXP endButton: autoDraw = False
29.6894 EXP textbox_2: text = ‘type here new stuff’
29.6894 EXP textbox_2: autoDraw = True
29.6894 EXP endbutton2: autoDraw = True
29.7417 DATA Mouse: Left button up, pos=(814,66)
31.9948 DATA Keypress: backspace
32.0078 EXP textbox_2: text = ‘type here nw stuff’
32.5757 DATA Keypress: backspace
32.6009 EXP textbox_2: text = ‘type here w stuff’
32.7671 DATA Keypress: backspace
32.7857 EXP textbox_2: text = ‘type herew stuff’
32.8977 DATA Keypress: backspace
32.9116 EXP textbox_2: text = ‘type herw stuff’
33.5175 DATA Keypress: right
33.8027 DATA Keypress: right
34.0682 DATA Keypress: right
34.6234 DATA Keypress: backspace
34.6423 EXP textbox_2: text = ‘type herw tuff’
34.8056 DATA Keypress: backspace
34.8263 EXP textbox_2: text = ‘type herwtuff’
34.9506 DATA Keypress: backspace
34.9688 EXP textbox_2: text = ‘type hertuff’
35.0881 DATA Keypress: backspace
35.1212 EXP textbox_2: text = ‘type hetuff’
35.2353 DATA Keypress: backspace
35.2574 EXP textbox_2: text = ‘type htuff’
35.3604 DATA Keypress: backspace
35.3733 EXP textbox_2: text = ‘type tuff’
35.4888 DATA Keypress: backspace
35.5075 EXP textbox_2: text = ‘typetuff’
35.6206 DATA Keypress: backspace
35.6435 EXP textbox_2: text = ‘typtuff’
35.7676 DATA Keypress: backspace
35.7927 EXP textbox_2: text = ‘tytuff’
36.4007 DATA Keypress: right
36.5563 DATA Keypress: right
37.0643 DATA Keypress: backspace
37.0758 EXP textbox_2: text = ‘tytff’
37.2487 DATA Keypress: backspace
37.2655 EXP textbox_2: text = ‘tyff’
37.4179 DATA Keypress: backspace
37.4304 EXP textbox_2: text = ‘tff’
37.5908 DATA Keypress: backspace
37.6144 EXP textbox_2: text = ‘ff’
37.7835 DATA Keypress: backspace
37.7947 EXP textbox_2: text = ‘fff’
38.6912 DATA Keypress: right
39.0501 DATA Keypress: backspace
39.0694 EXP textbox_2: text = ‘ff’
39.2442 DATA Keypress: backspace
39.2704 EXP textbox_2: text = ‘fff’
39.5481 DATA Keypress: backspace
39.5699 EXP textbox_2: text = ‘ff’
39.9684 DATA Keypress: backspace
39.9905 EXP textbox_2: text = ‘ff’
40.3308 DATA Keypress: backspace
40.3541 EXP textbox_2: text = ‘ff’
41.3422 DATA Keypress: backspace
41.3544 EXP textbox_2: text = ‘ff’
41.5989 DATA Keypress: backspace
41.6169 EXP textbox_2: text = ‘ff’
41.8034 DATA Keypress: backspace
41.8218 EXP textbox_2: text = ‘ff’
41.9860 DATA Keypress: backspace
42.0065 EXP textbox_2: text = ‘ff’
43.2981 DATA Keypress: backspace
43.3160 EXP textbox_2: text = ‘ff’
43.4503 DATA Keypress: backspace
43.4711 EXP textbox_2: text = ‘ff’
44.1639 DATA Keypress: right
44.5587 DATA Keypress: backspace
44.5708 EXP textbox_2: text = ‘f’
44.7249 DATA Keypress: backspace
44.7480 EXP textbox_2: text = ‘f’
45.0175 DATA Keypress: backspace
45.0388 EXP textbox_2: text = ‘f’
45.2636 DATA Keypress: backspace
45.2821 EXP textbox_2: text = ‘f’
45.6770 DATA Keypress: backspace
45.6879 EXP textbox_2: text = ‘f’
45.8956 DATA Keypress: backspace
45.9106 EXP textbox_2: text = ‘f’
46.2203 DATA Keypress: backspace
46.2401 EXP textbox_2: text = ‘f’
46.3999 DATA Keypress: backspace
46.4218 EXP textbox_2: text = ‘f’
47.7803 DATA Keypress: k
47.8132 EXP textbox_2: text = ‘kf’
47.9523 DATA Keypress: i
47.9820 EXP textbox_2: text = ‘ikf’
48.2358 DATA Keypress: n
48.2525 EXP textbox_2: text = ‘nikf’
48.3888 DATA Keypress: d
48.4067 EXP textbox_2: text = ‘dnikf’
48.5648 DATA Keypress: space
48.5812 EXP textbox_2: text = ‘dn ikf’
49.5826 DATA Keypress: o
49.6034 EXP textbox_2: text = ‘dn iokf’
50.0218 DATA Keypress: f
50.0343 EXP textbox_2: text = ‘dn iokff’
50.2714 DATA Keypress: space
50.3010 EXP textbox_2: text = ’ dn iokff’
51.2139 DATA Keypress: w
51.2360 EXP textbox_2: text = ’ wdn iokff’
51.3972 DATA Keypress: o
51.4162 EXP textbox_2: text = ’ wodn iokff’
51.7131 DATA Keypress: r
51.7317 EXP textbox_2: text = ’ wordn iokff’
51.8939 DATA Keypress: k
51.9171 EXP textbox_2: text = ’ workdn iokff’
52.0929 DATA Keypress: i
52.1049 EXP textbox_2: text = ’ workidn iokff’
52.2857 DATA Keypress: n
52.3134 EXP textbox_2: text = ’ workindn iokff’
52.4018 DATA Keypress: g
52.4389 EXP textbox_2: text = ’ workingdn iokff’
58.2451 DATA Mouse: Left button down, pos=(875,63)
58.2736 EXP New trial (rep=1, index=0): None
58.2901 EXP textbox_2: autoDraw = False
58.2901 EXP endbutton2: autoDraw = False
58.2901 EXP textbox: text = ‘Type a response here’
58.2901 EXP textbox: autoDraw = True
58.2901 EXP endButton: autoDraw = True
58.3434 DATA Mouse: Left button up, pos=(875,63)
59.8156 DATA Keypress: backspace
60.1385 DATA Keypress: backspace
60.4134 DATA Keypress: backspace
60.6262 DATA Keypress: backspace
60.8303 DATA Keypress: backspace
61.0393 DATA Keypress: backspace
65.3249 DATA Keypress: k
65.5255 DATA Keypress: d
65.6622 DATA Keypress: k
65.8296 DATA Keypress: d
65.9245 DATA Keypress: k
66.0246 DATA Keypress: d
66.1032 DATA Keypress: k
74.8791 DATA Mouse: Left button down, pos=(859,50)
74.9295 EXP textbox: autoDraw = False
74.9295 EXP endButton: autoDraw = False
74.9295 EXP textbox_2: text = ‘type here new stuff’
74.9295 EXP textbox_2: autoDraw = True
74.9295 EXP endbutton2: autoDraw = True
74.9977 DATA Mouse: Left button up, pos=(859,50)
76.3504 DATA Keypress: backspace
76.5264 DATA Keypress: backspace
76.6792 DATA Keypress: backspace
76.7941 DATA Keypress: backspace
76.9219 DATA Keypress: backspace
77.0171 DATA Keypress: backspace
77.7131 DATA Mouse: Left button down, pos=(865,79)
77.7371 EXP textbox_2: autoDraw = False
77.7371 EXP endbutton2: autoDraw = False
78.0850 EXP window1: mouseVisible = True

Hi There,

These threads might be helpful this was a known bug Editable textbox still showing through after update that has been fixed - I recommend downloading the recent release 2020.2.6 https://github.com/psychopy/psychopy/releases

Becca

1 Like

Ok,

So I downloaded the latest version and tried running the experiment and it is still crashing or it’s not advancing, everytime I add a new field, there is issues and nothing runs. I’m waiting 3 weeks now for my manual to arrive from Sage suppliers and I couldn’t do the course because I work parttime during the week, and you do not offer courses at the weekend.

The first file I have attached, is only the intro to the experiment, it runs as far as the second part, but everytime will NOT advance to the third part onto the consent trial. There’s just a blank grey screen which I have to ex out of. I dont understand why the experiment refuses to advance to the third trial because it follows the same setup as the other two trials. The only reason I followed the excel test format for this, is because it was the only thing I could get to work, where the experiment ran, even tho, the text is all over the place in the second trial of the experiment.

So after getting no where and not finding anything that could explain why the third trial just will not advance, I just continued to build the experiment and I added in a free recall trial. I used coding from Jason Ozuko youtube video online and this doesn’t work either, the experiment wont run at all on the latest version of PsychoPy, version 8. I am trying to do as much of the experiment in the builder and avoid any coding until I absolutely need to, as I have zero coding experience. The error that comes up is:

Alert 4205:Python Syntax Error in ‘Each Frame’ tab. See ’ screen_text = ".join(key_Resp.keys)
’ on line number 10 of the ‘Each Frame’ tab.
For further info see https://psychopy.org/alerts/4205.html

I then tried another, a more recent utube video which gave instruction ‘How to get typed responses in PsychoPy’ dated 19thOct. I created a new experiment to trial it first, and added a excel document which would change the text that appears above the response type space, but this wouldn’t run either, so then I just removed it and tried to get a screen to appear which allowed text to be written under the term text, but this also failed to run.

So when it also would not run under the new version of PsychoPy that I downloaded I just tried to create a new demo with a typed response box. I inserted a trial with just a response box in it, no endbutton text, or mouse response move, just wanted to test this one step, ran the experiment and again it failed, no screen appeared at all, just this message:

Welcome to PsychoPy3!
v2020.2.8
3.5622 WARNING We strongly recommend you activate the PTB sound engine in PsychoPy prefs as the preferred audio engine. Its timing is vastly superior. Your prefs are currently set to use [‘sounddevice’, ‘PTB’, ‘pyo’, ‘pygame’] (in that order).
Generating PsychoPy script…

Running: /Users/ennadarcy/Desktop/PsychoPy Experiment/Typed Response Demo 2_lastrun.py

281.9762 INFO Loaded monitor calibration from [‘2020_11_05 14:43’]
0.3934 WARNING We strongly recommend you activate the PTB sound engine in PsychoPy prefs as the preferred audio engine. Its timing is vastly superior. Your prefs are currently set to use [‘sounddevice’, ‘PTB’, ‘pyo’, ‘pygame’] (in that order).
6.7390 WARNING User requested fullscreen with size [1024 768], but screen is actually [1280, 800]. Using actual size
7.8403 ERROR Unknown colorSpace: named
2020-11-21 15:51:32.273 python[19913:71065] ApplePersistenceIgnoreState: Existing state will not be touched. New state will be written to (null)
Traceback (most recent call last):
File “/Users/ennadarcy/Desktop/PsychoPy Experiment/Typed Response Demo 2_lastrun.py”, line 99, in
autoLog=True,
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.6/psychopy/visual/textbox2/textbox2.py”, line 211, in init
self.text = text if text is not None else “”
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.6/psychopy/tools/attributetools.py”, line 32, in set
newValue = self.func(obj, value)
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.6/psychopy/visual/textbox2/textbox2.py”, line 293, in text
self._layout()
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.6/psychopy/visual/textbox2/textbox2.py”, line 469, in _layout
self.glFont.upload()
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.6/psychopy/visual/textbox2/fontmanager.py”, line 504, in upload
self.atlas.upload()
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.6/psychopy/visual/textbox2/fontmanager.py”, line 301, in upload
gl.GL_ALPHA, gl.GL_UNSIGNED_BYTE, self.data)
ctypes.ArgumentError: argument 9: <class ‘TypeError’>: wrong type

Experiment ended.

Now I am not even halfway through designing my experiment, I need to get the typed response key to work, so that I can have a trial where the participant has a ten minute free recall period where they can type in everything they remember from the material presented. In addition, I need to use the typed response key, to add a trial which facilitates typed responses to a list of ten questions, which I will present before and after the learning material (Pretesting and Final Recall Test). I still have to add the text document that presents the learning material and the learning material video. All of this before I get the experiment to randomise all the participants into three groups which follow a certain sequence of trials. The format of the experiment needs to go like this:

Experiment One

  1. Welcome Screen
  2. Experiment Instructions
  3. Experiment Instructions Questions
  4. Consent Form
  5. Pretest questions-Typed response
  6. Learning material text (2 page typed) presentation
  7. Free Recall typed response
  8. Learning material 2: Video
  9. Recall Test- 10 questions typed response
    10 Debriefing & unique user ID creation (typed Response)

Experiment Two
Unique ID Code Entry: typed response
Recall Test

My plan was just to build this experiment, get everything in there that needed to be in it and then pay someone to fix the running issues and get it online for me. Can you please help me?? I need to be in a position to go live with this experiment in mid December. I am willing to pay for instruction and someone to look over the experiment and tell me how to fix the issues.

Kind Regards

Testing as a Learning Tool Exp V2.psyexp (32.1 KB)

Hi There,

Sorry to hear you are having difficulties here, so that I can have a go running your experiment, please can you also attach your .xlsx files.

One thing that I can see from your file is that the duration of your ‘Consent_Answers’ component is 0 seconds - this meants that you will probably never see that component, and it will appear exactly as you describe (a blank grey screen that you need to esc out of) - try leaving the duration field of that component blank.

Best wishes,
Becca