Error for AMP task

8 views
Skip to first unread message

Heidi Vuletich

unread,
Jul 22, 2025, 1:06:29 PMJul 22
to Minno.js
Hello, 

I am copied a study that was running an AMP task (and working okay). Now the AMP stops working halfway through the task (just shows the labels and does not show the images). The error is attached. I made a few changes before the task broke. I replaced the images I had before so that there are fewer images now (80 total). The images have the same naming convention as before (pic1.jpg, pic2.jpg, etc). 

Please let me know if any additional information would be helpful. Thank you so much!

Heidi




Picture2.png

Yoav Bar-Anan

unread,
Jul 22, 2025, 2:47:06 PMJul 22
to Heidi Vuletich, Minno.js
Hi Heidi, 

Could you please send a link to the amp script?

Thanks,
Yoav

--
You received this message because you are subscribed to the Google Groups "Minno.js" group.
To unsubscribe from this group and stop receiving emails from it, send an email to minnojs+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/minnojs/9eb59ab7-4b96-4b99-86ac-bf5ccd2f8125n%40googlegroups.com.

Heidi Vuletich

unread,
Jul 24, 2025, 7:01:45 PMJul 24
to Yoav Bar-Anan, Minno.js
Hi Yoav, 


Please let me know if that works. It is possible that I could have used the extension as usual. If so, my apologies!
 
Best,
Heidi

Yoav Bar-Anan

unread,
Jul 24, 2025, 11:54:45 PMJul 24
to Heidi Vuletich, Minno.js

Hi Heidi,

In your code, you had:

 for (var itarget = 1; itarget <= 80; itarget++)
    {
        targetMedia.push({image:global.amppics[itarget]});
    }

But the index of arrays in JavaScript runs from 0 to length-1, so you added a cell that does not exist (global.amppics[80]).

A safer code may fix the problem:

 for (var itarget = 0; itarget < global.amppics.length; itarget++)
    {
        targetMedia.push({image:global.amppics[itarget]});
    }


I hope that you know that we have an extension for creating AMPs. If there are any features that you think are missing from that extension, please let me know. If those features are likely to serve other studies in the future, I will try to add them to the extension.

All the best,
Yoav

Heidi Vuletich

unread,
Jul 29, 2025, 11:03:55 PMJul 29
to Yoav Bar-Anan, Minno.js
Thank you so much, Yoav! I see the extension for creating AMPs. I confess I just forgot how to use extensions, but I can see now from my studies using the IAT that you simply call the extension in something like return iatExtension

Thanks again!
Heidi

Reply all
Reply to author
Forward
0 new messages