Error loading picture


Author
Message
sallidina
sallidina
Associate Member (74 reputation)Associate Member (74 reputation)Associate Member (74 reputation)Associate Member (74 reputation)Associate Member (74 reputation)Associate Member (74 reputation)Associate Member (74 reputation)Associate Member (74 reputation)Associate Member (74 reputation)
Group: Forum Members
Posts: 6, Visits: 47
Hi! I'm getting an odd error when trying to load pictures into my Inquisit script. I have a much longer script in which I need to randomly select one of two unique images for multiple stimuli, and then show the same selected pictures again later in the experiment. The way I've gone about this is to create multiple pictures and then create an item element where I can include the current items of each picture to then draw from.

Here's an extremely pared down version that reproduces the error. When I run this, I get an error saying 'Unable to load the picture ''. Network Error: Protocol "" is unknown'. However, when I take out the second line from the "allPics" item and only include the first picture, it works fine. Given that I've read in the same image twice in this test version, I can't figure out why this is happening for one picture but not the other. This seems to happen regardless of the image I read in so I don't think the actual image is the problem, but let me know if it's helpful to include that.

Any help would be appreciated!




<picture BFO1>
/ items = ("test_picture.png")
</picture>

<picture WFO1>
/ items = ("test_picture.png")
</picture>

<item allPics>
/1="<%picture.BFO1.currentitem%>"
/2="<%picture.WFO1.currentitem%>"
</item>

<picture impressionPic>
/items = allPics
</picture>

<trial formImpression>
/ stimulusframes = [1 = impressionPic]
/ validresponse = (" ")
</trial>

<block impressions>
/ trials = [1-2=formImpression]
</block>

<trial setup>
/ stimulusframes = [1=BFO1, WFO1]
/ trialduration = 0
/ recorddata = false
</trial>

<block setup>
/ trials = [1=setup]
</block>

<expt>
/ blocks = [1=setup; 2=impressions]
</expt>



Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K
sallidina - 2/13/2024
Hi! I'm getting an odd error when trying to load pictures into my Inquisit script. I have a much longer script in which I need to randomly select one of two unique images for multiple stimuli, and then show the same selected pictures again later in the experiment. The way I've gone about this is to create multiple pictures and then create an item element where I can include the current items of each picture to then draw from.

Here's an extremely pared down version that reproduces the error. When I run this, I get an error saying 'Unable to load the picture ''. Network Error: Protocol "" is unknown'. However, when I take out the second line from the "allPics" item and only include the first picture, it works fine. Given that I've read in the same image twice in this test version, I can't figure out why this is happening for one picture but not the other. This seems to happen regardless of the image I read in so I don't think the actual image is the problem, but let me know if it's helpful to include that.

Any help would be appreciated!




<picture BFO1>
/ items = ("test_picture.png")
</picture>

<picture WFO1>
/ items = ("test_picture.png")
</picture>

<item allPics>
/1="<%picture.BFO1.currentitem%>"
/2="<%picture.WFO1.currentitem%>"
</item>

<picture impressionPic>
/items = allPics
</picture>

<trial formImpression>
/ stimulusframes = [1 = impressionPic]
/ validresponse = (" ")
</trial>

<block impressions>
/ trials = [1-2=formImpression]
</block>

<trial setup>
/ stimulusframes = [1=BFO1, WFO1]
/ trialduration = 0
/ recorddata = false
</trial>

<block setup>
/ trials = [1=setup]
</block>

<expt>
/ blocks = [1=setup; 2=impressions]
</expt>



This is a bad way to go about something like this, and you should not do that.

The reason why it "works" for the 1st item is because <picture BFO1> is parsed before <picture impressionPic>, but <picture WFO1> is only parsed after <picture impressionPic>.

Parsing of elements of the same type generally occurs in alphabetical order.

sallidina
sallidina
Associate Member (74 reputation)Associate Member (74 reputation)Associate Member (74 reputation)Associate Member (74 reputation)Associate Member (74 reputation)Associate Member (74 reputation)Associate Member (74 reputation)Associate Member (74 reputation)Associate Member (74 reputation)
Group: Forum Members
Posts: 6, Visits: 47
I see, thanks for the reply! Any ideas on how to better accomplish this then?

I have 24 pictures and each one has to have one of two images assigned to it for each participant (a different two images for each of the 24). This selection will be based off some logic that I calculate using <values> and then pass to the /select argument of the picture.

I want to present those 24 pictures across 24 trials in random order to the participant, and then need a single final trial where I show all 24 at once.

Is it possible to do this while creating only two trials total, repeating the first one 24 times? E.g., can I somehow include all 24 pictures in a list which I then pass into the repeating trial? I tried various iterations of this but wasn't successful.


Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K
sallidina - 2/13/2024
I see, thanks for the reply! Any ideas on how to better accomplish this then?

I have 24 pictures and each one has to have one of two images assigned to it for each participant (a different two images for each of the 24). This selection will be based off some logic that I calculate using <values> and then pass to the /select argument of the picture.

I want to present those 24 pictures across 24 trials in random order to the participant, and then need a single final trial where I show all 24 at once.

Is it possible to do this while creating only two trials total, repeating the first one 24 times? E.g., can I somehow include all 24 pictures in a list which I then pass into the repeating trial? I tried various iterations of this but wasn't successful.


You need 24 <picture> elements if you want to show 24 images at once (i.e. for the final trial). For all the rest, you can work this out with a single trial and single picture element run 24 times. Have all (48, I think) images in a single <item> element, by some logic, put the 24 item numbers to show in a <list> /onexptbegin, and then have the trial just sample one item number from that list and have the picture element display that item.

Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K
Dave - 2/13/2024
sallidina - 2/13/2024
I see, thanks for the reply! Any ideas on how to better accomplish this then?

I have 24 pictures and each one has to have one of two images assigned to it for each participant (a different two images for each of the 24). This selection will be based off some logic that I calculate using <values> and then pass to the /select argument of the picture.

I want to present those 24 pictures across 24 trials in random order to the participant, and then need a single final trial where I show all 24 at once.

Is it possible to do this while creating only two trials total, repeating the first one 24 times? E.g., can I somehow include all 24 pictures in a list which I then pass into the repeating trial? I tried various iterations of this but wasn't successful.


You need 24 <picture> elements if you want to show 24 images at once (i.e. for the final trial). For all the rest, you can work this out with a single trial and single picture element run 24 times. Have all (48, I think) images in a single <item> element, by some logic, put the 24 item numbers to show in a <list> /onexptbegin, and then have the trial just sample one item number from that list and have the picture element display that item.

Or, if you already have defined 24 <picture> elements, just put *those* in a <list> and have the trial display one sampled from the list.

Here's a quick example using <text> elements.

<text a>
/ items = ("A")
</text>

<text b>
/ items = ("B")
</text>

<text c>
/ items = ("C")
</text>

<text d>
/ items = ("D")
</text>

<list stimlist>
/ items = (text.a, text.b, text.c, text.d)
</list>

<trial mytrial>
/ ontrialbegin = [
    trial.mytrial.resetstimulusframes();
    trial.mytrial.insertstimulusframe(list.stimlist.nextvalue, 1);
]
/ validresponse = (57)
</trial>

<block myblock>
/ trials = [1-4 = trial.mytrial]
</block>

<data>
/ columns = (date time subject group session blocknum blockcode trialnum trialcode stimulusitem response latency correct)
</data>

Edited 3 Months Ago by Dave
sallidina
sallidina
Associate Member (74 reputation)Associate Member (74 reputation)Associate Member (74 reputation)Associate Member (74 reputation)Associate Member (74 reputation)Associate Member (74 reputation)Associate Member (74 reputation)Associate Member (74 reputation)Associate Member (74 reputation)
Group: Forum Members
Posts: 6, Visits: 47
This is perfect, thank you Dave!

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search