PennController for IBEX › Forums › Support › Unpredictably stuck in preloading
- This topic has 3 replies, 2 voices, and was last updated 2 years, 8 months ago by Jeremy.
October 5, 2020 at 3:45 pm #6185rbieberParticipant
I have a fairly straightforward experiment (hear a sentence, enter text) that has been working successfully. I’m trying to modify the experiment to add a feedback portion (hear a sentence, enter text, hear the sentence again), and I can’t figure out what’s causing my problem.
I’m currently using a template for my trials, and using a sample .csv of just 5 stimulus items to test the experiment as I make changes. I think I’ve successfully put in all the elements that I want, and they seem to be working, but I am unpredictably getting the ‘please wait while resources are pre-loading’ text as I test the experiment. Sometimes it happens after 1 successful trial, sometimes not until after all 5 trials, and anywhere in between. I have yet to make it through the sample experiment successfully; have not seen results sent to server yet. Pasting in my (inelegant) template code below, as it’s the only part of the experiment code that I have modified in adding in my feedback. Thanks for the help!!
Template( "sample.csv" , row => newTrial( "experiment" , newText("attend", "Ready...") .center() .print() , newTimer(750) .start() .wait() , getText("attend") .remove() , newAudio("Sentence", row.Filename) .play() .wait() , newText("instruct", "Type what you heard in the box below") .center() .print() , newTextInput("response", "") .center() .print() .log() .log("final") , newButton("Submit button", "Submit") .center() .print() .wait(getTextInput("response").testNot.text("")) , getText("instruct") .remove() , getTextInput("response") .remove() , getButton("Submit button") .remove() , newTimer(750) .start() .wait() , newText("intended", "The intended sentence was:") .center() .print() , newText("sentence", row.Sentence) .center() .print() .bold() , newTimer(250) .start() .wait() , newButton("Repeat", "Click to hear the sentence again") .center() .print() .wait() , getText("intended") .remove() , getButton("Repeat") .remove() , getAudio("Sentence") .play() .wait() , newTimer(250) .start() .wait() , getText("intended") .remove() , getText("sentence") .remove() , newButton("next trial", "Next trial") .center() .print() .wait() ) .log( "Sentence" , row.Sentence ) .log( "TalkerID" , row.TalkerID ) .log( "TalkerL1" , row.TalkerL1 ) .log( "SentenceID" , row.SentenceID) )October 5, 2020 at 4:00 pm #6188JeremyKeymaster
Do you have a Sequence command containing randomize("experiment")? From what you describe, I suspect that there’s a typo in one of the rows’ Filename column, which results in your experiment failing to preload that resource, and that the randomize function shows the corresponding trial sometimes at the beginning of the experiment, sometimes later in the sequence of trials. Make sure you double-check Filename for each row in your table, and each filename in your project’s Resources folder
JeremyOctober 5, 2020 at 4:34 pm #6194rbieberParticipant
Thanks for the quick response, Jeremy! That was my first guess as well, but I don’t think that’s it (had checked them previously, had used a .csv from a different experiment and just deleted everything but the first 5 lines). I just tried taking out randomize() and running it without the randomization, and it did the same thing – took me through all 5 trials and then got stuck. I just looked back again at the .csv file, and realized the problem: there were 2 “blank” lines included at the end. No text was present, but the line numbers were showing up, so I’m guessing it was trying to read in those lines. Just deleted them out and the line numbers disappeared and the problem is resolved.
Thanks for the help!October 5, 2020 at 4:38 pm #6195JeremyKeymaster
Good catch! It was also listed on the troubleshooting help page, actually, I guess I should’ve applied my own medicine before posting my message
- You must be logged in to reply to this topic.