Hello,
I was hoping that I might be able to get some help on an IAT script I was working on. I'm trying to adapt a pre-existing script that we use in our lab (it is an adaptation of Tony Greenwald's generic script available on his website). Basically, I'm trying to adapt it such that it will allow for subject stimuli selection. I want to present a set of photos for Target 1 and then for Target 2and have subjects select a subset of them that will be used as stimuli in the IAT.
I adapted the "select items" script available on millisecond's website and have been trying to adapt/ incorporate it into the IAT script. I have it set up such that there is a an additional block with two trials -- one for each of two survey pages -- one for target A and one for target B.
When Inquisit tries to run the script, it crashes. Specifically, when it's parsing the elements, there are error messages about the selected items.
<item Targ1>
/items: Could not locate trial 'selectedalcbevs'.<item Targ2> /items: Could not locate trial 'selectednonbevs'.
I'm clearly missing a step at integrating the two tasks (stimuli selection and the IAT). I am absolutely not a programmer and can't figure out where I went wrong. I have included my script, and I would be so grateful if anyone has any feedback/help!
Many thanks,
Kristen
Does it work now (check attached)? If not, could you please put your script and all picture files into a *.zip and upload it here or somewhere else? It's a real pain to debug these things with all those 'file not found' errors...
~Dave
"To understand recursion, you must first understand recursion." - Unknown Zen Master
Dave,
You're a god or at least, a godsend. It works beautifully. How did you fix it? I'd like to learn so I don't have trouble you or others in the future.
Best,
kristen:You're a god or at least, a godsend
Trust me, I am neither...;-) And actually, this was a relatively easy fix. I'll outline:
In the first task (subjects pick the pictures), the selected pics are stored in these two <item> elements:
<item selectedalcbevs></item><item selectednonbevs></item>
Remember: For the IAT you want these items to be used as targets, i.e. by <picture TARG1> and <picture TARG2>. Now, if we look at the definition for these two elements we see that they reference yet another two <item> elements:
<picture TARG1>/ items = TARG1[...]</picture >
<picture TARG2>/ items = TARG2[...]</picture >
which in turn try to reference <item selectedalcbevs> and <item selectednonbevs>:
<Item Targ1>/items = selectedalcbevs</item>
<Item Targ2>/items = selectednonbevs</item>
Problem is: An <item> element can't reference another <item> element. Additionally Inquisit misinterpretes this particular setup as <item Targ1> and <item Targ2> obtaining their items from a <trial> named 'selectedalcbevs' and <trial selectednonbevs>, respectively.
Solution is simple: Have <picture TARG1> and <picture TARG2> reference the correct <item> elements directly:
<picture TARG1> / items = selectedalcbevs [...] </picture >
<picture TARG2> / items = selectednonbevs [...] </picture >
Done.
Hope this helps,
Thanks, Dave. That makes a ton of sense.
Much appreciated!
Hi again,
I worked on the revised IAT file -- the one that Dave helped with me -- and expanded it such that I could provide subjects with 16 (vs. 9) choices for stimuli.
I largely cut and pasted so that I could expand the working script, but I am still getting errors
Three seem to come up:
<expressions> Expression 'checkboxes.nonbev1.checked.1' is invalid. Expression contains an unknown element or property name.<item alcbevoptions> /items: Could not locate trial '20'.<surveypage nonbevpage> /questions: Could not locate element 'nonbev1'. /stimulusframes: Could not locate element 'nonbev1'. /questions: surveypage 1 is unassigned.
I've been through the script multiple times over several days and I can't find or fix the errors. If anyone has any ideas or help, I'd really appreciate it. I've attached a zip file with the script and stimuli.
Try again with the attached file. Seems like you forgot a few double quotes for some of your items which lead to subsequent elements not being found by the parser. Note that the right editor panel informs about such errors -- it's worth taking a thorough look at everything reported there.
How stupid of me. Thanks, Dave.
Sorry to trouble you again.
kristen:How stupid of me.
Not at all.
kristen:Sorry to trouble you again.
Don't be -- that's what this place is for, IMO!
Cheers,
Hi Dave,
I think (I hope/pray) this is my last question for you about the custom IAT. I have it done -- have adapted it for the specific IATs I want to run, and it works BEAUTIFULLY on my computer. I'm running XP, I'm using Inquisit 3.0.3.1. And it even works when I move the experiment folder to different locations on my computer. I cannot make it crash on my machine.
However, when I put that same folder on other computers in my lab (running XP, running Inquisit 3.0.3.2), it will crash. I'm putting the folder in a directory right on the C drive so all the file extensions stay short -- and I'm moving it via a flashdrive and by copy and paste (i.e., I'm not dragging and dropping). The errors are intermittent -- I'd say they occur 50% of the time -- and they crash the IAT. The error message I get is:
Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4
Unabled to initialize <picture TARG2> item number 1.
The error will alternate b/t TARG1 and TARG2. I saw in other posts that this could a file path/naming issue. All of the image files are in the folder as the IAT and I don't use full path names in my script -- just the name of the image (e.g., pic1.jpg). I cannot figure out why the error is there and why it doesn't happen on my own computer. I've changed nothing other than the computer, and it baffles me that it happens but doesn't happen every time.
I also did the reverse and re-copied the folder from the lab computer and put it back on my own computer, and I still can't get it to crash on my machine.
Can you help?
kristen:Can you help?
Not really, I'm afraid. However, you state that you're running different versions of Inquisit on your PC and the lab machines -- you report that the script works fine under 3.0.3.1 (your PC) but may fail under 3.0.3.2 (lab PCs). So, the first thing I'd try is to get the same version on all PCs. You could either use 3.0.3.1 or (better yet) update everything to the most recent stable version 3.0.4.0 available from millisecond.com. For starters I recommend installing 3.0.4.0 on your PC only to verify that the script does not crash under this version. If your tests are successful, roll out 3.0.4.0 on the lab machines.
If none of this helps, you should probably email support<at>millisecond.com.
Best wishes from a fellow Inquisit user,
Thanks, Dave. I upgraded my copy to 3.0.4.0 and now my machine has the exact same issues as the other ones in the lab. I'll email support.
Take good care,
Sorry to hear that. But at least we know now that you're likely hitting a bug introduced after 3.0.3.1. Btw, if you're under time pressure and want to downgrade to 3.0.3.1, the installer is available here: http://www.millisecond.com/download/win/Inquisit_3031.exe.
great! many thanks!
kristen