Can't type in textbox

macOS Catalina (10.15.7)
2020.2.5
Standalone

Hello,

I have a loop with questions that require typed responses. I have followed the instructions on the YouTube tutorial on this component. I can type my response for the first question and proceed to the next one however it is not possible to type in any response for the remaining questions.

Before this loop, I have 2 Qs that require a response out of 3 possible keys (for which I use the keyboard component). Somehow the responses to these 2 Qs are visible in the textbox of the first question of the loop.

I tried to run with the 2020.2.3 version but it didn’t work. The dialog box was followed by brief blank window. Below is the stdout message:

Thanks in advance!
Ahu

Generating PsychoPy script…

3.4139 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).
2020-11-06 18:55:57.341 python[2520:245259] ApplePersistenceIgnoreState: Existing state will not be touched. New state will be written to (null)

Running: /Users/ahugokce/class project/337EXPolss_lastrun.py

9194.4604 INFO Loaded monitor calibration from [‘2020_07_08 20:49’]
9194.7125 INFO /Applications/PsychoPy.app/Contents/MacOS/python -m psychopy.scripts.psyexpCompile /Users/ahugokce/class project/337EXPolss.psyexp -o /Users/ahugokce/Documents/class project/337EXPolssclass project/337EXPolss_lastrun.py -v 2020.2.3
0.9785 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).
8.5018 ERROR Unknown colorSpace: named
2020-11-06 18:56:02.137 python[2535:246052] ApplePersistenceIgnoreState: Existing state will not be touched. New state will be written to (null)
Traceback (most recent call last):
File “/Users/ahugokce/Documents/class project/337EXPolss_lastrun.py”, line 196, in
autoLog=True,
File “/Users/ahugokce/.psychopy3/versions/psychopy/visual/textbox2/textbox2.py”, line 207, in init
‘fillRGB’: self.box.fillRGB
File “/Users/ahugokce/.psychopy3/versions/psychopy/visual/textbox2/textbox2.py”, line 244, in pallette
pal[‘fillRGB’] = pal[‘fillColor’] = [min(c + 0.05, 0.95) for c in self.win.color]
File “/Users/ahugokce/.psychopy3/versions/psychopy/visual/textbox2/textbox2.py”, line 244, in
pal[‘fillRGB’] = pal[‘fillColor’] = [min(c + 0.05, 0.95) for c in self.win.color]
TypeError: must be str, not float

Experiment ended.

Hi Ahu,

Please can you share the URL to your gitlab project with us (view code>settings>permissions>public share that URL with us)

It sounds as though you might need to clear the event history so that your textbox component doesn’t show previous key presses.

Becca

Hi Becca,

Thank you very much for the quick reply. Here is the link: https://gitlab.pavlovia.org/ahu.g/gra-en/tree/master/class%20project

Thanks,
Ahu

This demo should now work https://gitlab.pavlovia.org/lpxrh6/gra-en

The problems were:

  1. v 2020.2.3 needed to allow textbox to be editable on multiple iterations - you already correctly identified and tried this, but…
  2. that created an error with fill color (that you shared above (thankyou) so we need to set the textbox fill color to be ‘black’ rather than ‘None’
  3. I added a code component to clear the textbox at the start of the routine using textbox.text = ‘’ (and added the JS equivilent) - this is possibly a bug I will look into further.

For now though hopefully this works :slight_smile:

Becca

It works :slight_smile: Thank you so much!

happy to help!

Hi there @Becca ,

I’m new to PsychoPy and believe I’m encountering a similar issue to that mentioned above. I have the newest version of PsychoPy Builder installed (v2020.2.10), but I am running the experiment with version 2020.2.3.

My experiment also has a loop with questions that require typed responses. Each response is followed by feedback informing the participant as to whether their response is incorrect or correct. When I pilot my experiment online, the text-box does not allow me to type anything into the response field. Here is the link to my public repo: Ashley L Miller / PAprobe_test · GitLab

Below is the PsychoPy script I get when generating the program on my lab computer (Windows 7 professional 64-bit Operating System):

6.4344 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).
7.3330 WARNING duplicate variable names: word1, corrAns, cue, word2

Running: C:\Users\MAID Lab Manager\Desktop\PAprobe\PAprobe_lastrun.py

881.4896 EXP Imported itemcons.xlsx as conditions, 10 conditions, 2 params
881.4974 EXP Imported conditions.xlsx as conditions, 10 conditions, 2 params
881.5084 EXP Imported PA_trial_items.xlsx as conditions, 75 conditions, 2 params
881.5202 EXP Imported PA_trial_items.xlsx as conditions, 75 conditions, 2 params
881.5314 EXP Imported PA_trial_items.xlsx as conditions, 75 conditions, 2 params
881.5425 EXP Imported PA_trial_recall.xlsx as conditions, 75 conditions, 2 params
881.5426 WARNING duplicate variable names: word1, corrAns, word2, cue
881.5440 INFO Loaded monitor calibration from [‘2020_09_22 13:05’]
881.5786 EXP Imported itemcons.xlsx as conditions, 10 conditions, 2 params
881.5850 EXP Imported conditions.xlsx as conditions, 10 conditions, 2 params
881.5957 EXP Imported PA_trial_items.xlsx as conditions, 75 conditions, 2 params
881.6071 EXP Imported PA_trial_items.xlsx as conditions, 75 conditions, 2 params
881.6183 EXP Imported PA_trial_items.xlsx as conditions, 75 conditions, 2 params
881.6295 EXP Imported PA_trial_recall.xlsx as conditions, 75 conditions, 2 params
881.6295 WARNING duplicate variable names: word1, corrAns, word2, cue
881.6335 INFO C:\Program Files\PsychoPy3\python.exe -m psychopy.scripts.psyexpCompile C:\Users\MAID Lab Manager\Desktop\PAprobe\PAprobe.psyexp -o C:\Users\MAID Lab Manager\Desktop\PAprobe\PAprobe_lastrun.py -v 2020.2.3
pygame 1.9.6
Hello from the pygame community. https://www.pygame.org/contribute.html
1.6366 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.2019 ERROR Unknown colorSpace: named
10.5306 ERROR Unknown colorSpace: named
Traceback (most recent call last):
File “C:\Users\MAID Lab Manager\Desktop\PAprobe\PAprobe_lastrun.py”, line 2216, in
win.flip()
File “C:\Users\MAID Lab Manager\AppData\Roaming\psychopy3\versions\psychopy\visual\window.py”, line 1035, in flip
if self._mouse.isPressedIn(thisObj):
File “C:\Users\MAID Lab Manager\AppData\Roaming\psychopy3\versions\psychopy\event.py”, line 870, in isPressedIn
return any(wanted & pressed) and shape.contains(self)
AttributeError: ‘NoneType’ object has no attribute ‘contains’

Experiment ended.

Any help whatsoever would be greatly appreciated!!

All the best,
Ashley

Hi Ashley,

What happens if you run the experiment on 2020.2.10?

For that specific error, it doesn’t look like a textbox error it looks like thisObj doesn’thave the attribute contains (but I see it is a text stim so that shouldn’t be the case) - Please could you confirm what happens if you make it so that any click is accepted (remomving endButton from the clickable stimuli field).

Thanks,
Becca