# Unknown Resource Error Pilot Test

**URL:** <https://discourse.psychopy.org/t/unknown-resource-error-pilot-test/13727>\
**Category:** Online experiments\
**Created:** [May 27, 2020, 3:13pm UTC](https://discourse.psychopy.org/t/unknown-resource-error-pilot-test/13727 "2020-05-27T15:13:39Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![kthompson70](https://avatars.discourse-cdn.com/v4/letter/k/5f9b8f/32.png) [@kthompson70](https://discourse.psychopy.org/u/kthompson70)\
**Post date:** [May 27, 2020, 3:13pm UTC](https://discourse.psychopy.org/t/unknown-resource-error-pilot-test/13727/1 "2020-05-27T15:13:39Z")

</div>

URL of experiment: [PrisonersdilemmaToneRillingFullJava [PsychoPy]](https://run.pavlovia.org/kthompson70/prisoners-dilemma/html)

Description of the problem: Hello everyone. I am trying to start a pilot run for my experiment but when I launch the experiment I can only progress through the text-based slides. When I reach a point in which a visual stimulus must be pulled from the resources folder I receive this message.

![Screenshot_2020-05-15 PrisonersdilemmaToneRillingFull PsychoPy](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/8/e/8e0540af99bcb359b4cd7bcbe53849bfb146eafd.png)

I’m not sure what is causing this error. Thank you for any help.

---

<div class="post-metadata">

**Author:** ![ylrbc](https://avatars.discourse-cdn.com/v4/letter/y/e47774/32.png) [@ylrbc](https://discourse.psychopy.org/u/ylrbc)\
**Post date:** [May 28, 2020, 5:02am UTC](https://discourse.psychopy.org/t/unknown-resource-error-pilot-test/13727/2 "2020-05-28T05:02:56Z")

</div>

It cannot find the image for Decision\_Screen1.

---

<div class="post-metadata">

**Author:** ![kthompson70](https://avatars.discourse-cdn.com/v4/letter/k/5f9b8f/32.png) [@kthompson70](https://discourse.psychopy.org/u/kthompson70)\
**Post date:** [May 29, 2020, 4:19pm UTC](https://discourse.psychopy.org/t/unknown-resource-error-pilot-test/13727/3 "2020-05-29T16:19:51Z")

</div>

Yes I understand. The image is in the resources folder and I also have a conditions file with the jpg names inserted so I’m not sure why it can’t find the image.

---

<div class="post-metadata">

**Author:** ![Naomi.T](https://avatars.discourse-cdn.com/v4/letter/n/c6cbf5/32.png) [@Naomi.T](https://discourse.psychopy.org/u/Naomi.T)\
**Post date:** [June 2, 2020, 3:38am UTC](https://discourse.psychopy.org/t/unknown-resource-error-pilot-test/13727/4 "2020-06-02T03:38:21Z")

</div>

I’m having the same issue!  
Were you able to resolve it? Desperate for a solution!

Thanks 🙂

---

<div class="post-metadata">

**Author:** ![wakecarter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/wakecarter/32/5753_2.png) [@wakecarter](https://discourse.psychopy.org/u/wakecarter)\
**Post date:** [June 2, 2020, 5:16am UTC](https://discourse.psychopy.org/t/unknown-resource-error-pilot-test/13727/5 "2020-06-02T05:16:24Z")

</div>

Please could you show your code or a screenshot of the component that is giving the error and confirm that the file is in the html/resources folder?

---

<div class="post-metadata">

**Author:** ![Naomi.T](https://avatars.discourse-cdn.com/v4/letter/n/c6cbf5/32.png) [@Naomi.T](https://discourse.psychopy.org/u/Naomi.T)\
**Post date:** [June 2, 2020, 8:00am UTC](https://discourse.psychopy.org/t/unknown-resource-error-pilot-test/13727/6 "2020-06-02T08:00:56Z")

</div>

Hi,  
I just shared my experiment with you as a guest (not sure if that was what I needed to do) sorry I’m still learning!

 ![Screen Shot 2020-06-02 at 12.44.52 pm](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/c/6/c6e97d0aca537017e3441249a66b3ff26fcdb237.png)

This is what was coming up.

Your help would be appreciated!

---

<div class="post-metadata">

**Author:** ![wakecarter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/wakecarter/32/5753_2.png) [@wakecarter](https://discourse.psychopy.org/u/wakecarter)\
**Post date:** [June 2, 2020, 10:28am UTC](https://discourse.psychopy.org/t/unknown-resource-error-pilot-test/13727/7 "2020-06-02T10:28:59Z")

</div>

At guest level I seem to be able to pilot the experiment.

To start with there’s a face then a rating scale – for which I have to press space after selecting. After the three practice trials I’m not seeing any faces, just the rating scale.

Are you only getting an error for that particular image, as opposed to all of the others? I’m unable to confirm (or deny) it’s existence.

---

<div class="post-metadata">

**Author:** ![Naomi.T](https://avatars.discourse-cdn.com/v4/letter/n/c6cbf5/32.png) [@Naomi.T](https://discourse.psychopy.org/u/Naomi.T)\
**Post date:** [June 2, 2020, 10:52am UTC](https://discourse.psychopy.org/t/unknown-resource-error-pilot-test/13727/8 "2020-06-02T10:52:30Z")

</div>

Yes, I used a code I believe you gave to someone else on a previous occasion and it helped me with my trial images however once the experiment reaches the point where it requires the excel spread sheet it doesn’t upload the images…  
The warning sign is gone however I’m now unsure whether theres a way to fix this so that pavlovia reads the images on the excel sheet.

If you have any ideas, I’d love to hear!  
Thank you for your responses so far 🙂

---

<div class="post-metadata">

**Author:** ![wakecarter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/wakecarter/32/5753_2.png) [@wakecarter](https://discourse.psychopy.org/u/wakecarter)\
**Post date:** [June 2, 2020, 11:25am UTC](https://discourse.psychopy.org/t/unknown-resource-error-pilot-test/13727/9 "2020-06-02T11:25:43Z")

</div>

Without an error message it’s difficult to debug by proxy.

However, the most likely options might be that the image is being presented but either off the screen, too small or with zero opacity. Please could you show a screenshot of the image component.

---

<div class="post-metadata">

**Author:** ![Naomi.T](https://avatars.discourse-cdn.com/v4/letter/n/c6cbf5/32.png) [@Naomi.T](https://discourse.psychopy.org/u/Naomi.T)\
**Post date:** [June 2, 2020, 11:50am UTC](https://discourse.psychopy.org/t/unknown-resource-error-pilot-test/13727/10 "2020-06-02T11:50:57Z")

</div>

![Screen Shot 2020-06-02 at 9.46.04 pm](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/7/f/7f3cb726d6bddc622e6560ec39a7a395b2ad44df.png)

Images that were

 ![Screen Shot 2020-06-02 at 9.47.56 pm](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/7/6/76a8d0b28cac4232235970a7825f5b421e3fc03a.png)

Okay, so this is a section from my excel spreadsheet of the image components - the size and position are set in pix.  
And I attached the image properties done in the builder of psychopy.

All the images work perfectly fine when I run it through psychopy and don’t go off screen, which is why I’m confused by what could be affecting it for pavlovia.

---

<div class="post-metadata">

**Author:** ![wakecarter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/wakecarter/32/5753_2.png) [@wakecarter](https://discourse.psychopy.org/u/wakecarter)\
**Post date:** [June 2, 2020, 1:09pm UTC](https://discourse.psychopy.org/t/unknown-resource-error-pilot-test/13727/11 "2020-06-02T13:09:58Z")

</div>

From my crib sheet

DON’T  
Use an array for locations  
DO  
Use separate variables for x and y coordinates, e.g. $(x,y)

> **[PsychoPy Python to Javascript crib sheet](https://docs.google.com/document/d/13jp0QAqQeFlYSjeZS0fDInvgaDzBXjGQNe4VNKbbNHQ/edit?usp=sharing)**
>
> PsychoPy version 2020.1.3Python to Javascript Crib Sheet Compiled by Wakefield Morys-Carter, Oxford Brookes UniversityPlease retweet Psych\_Stats. PsychoPy 2020 has an automatic Python to Javascript translation tool. This document contains...

---

<div class="post-metadata">

**Author:** ![kthompson70](https://avatars.discourse-cdn.com/v4/letter/k/5f9b8f/32.png) [@kthompson70](https://discourse.psychopy.org/u/kthompson70)\
**Post date:** [June 2, 2020, 9:51pm UTC](https://discourse.psychopy.org/t/unknown-resource-error-pilot-test/13727/12 "2020-06-02T21:51:48Z")

</div>

Hi wakecarter,

![image](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/6/c/6cd4c047ecbfe1027bfef025b51ce26d1687baf8.png)

This is what the code looks for the original post. I’m assuming the error would occur for any visual stimuli that I would set as the first image to be shown to the participant. The image files are in fact in the html/resources folder and all jpg names are located in an excel file that is also in the resources folder.

---

<div class="post-metadata">

**Author:** ![wakecarter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/wakecarter/32/5753_2.png) [@wakecarter](https://discourse.psychopy.org/u/wakecarter)\
**Post date:** [June 2, 2020, 9:55pm UTC](https://discourse.psychopy.org/t/unknown-resource-error-pilot-test/13727/13 "2020-06-02T21:55:23Z")

</div>

If you look at the other error message on this thread, you’ll see .jpg in the “when getting the value of…” part. In your case it just says D. Shouldn’t it be trying to set the image as D.jpg (or whatever)?

---

<div class="post-metadata">

**Author:** ![kthompson70](https://avatars.discourse-cdn.com/v4/letter/k/5f9b8f/32.png) [@kthompson70](https://discourse.psychopy.org/u/kthompson70)\
**Post date:** [June 2, 2020, 10:08pm UTC](https://discourse.psychopy.org/t/unknown-resource-error-pilot-test/13727/14 "2020-06-02T22:08:55Z")

</div>

Yes exactly, but for some reason it does not read the whole name of the jpg image from the excel file.

These are the jpgs in Gitlab

 ![image](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/6/0/60a6bef748934ddb5476541c067be834fdca71b0.png)

And here is the excel file:

![image](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/5/d/5db0863c80db91c5fadd22a55321ad71e743b181.png)

As you can see in the excel file, DecisionPsychoPy.jpg is the first image that should be pulled from the excel file, but I think it just stops at D and stops reading the file.

---

<div class="post-metadata">

**Author:** ![wakecarter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/wakecarter/32/5753_2.png) [@wakecarter](https://discourse.psychopy.org/u/wakecarter)\
**Post date:** [June 2, 2020, 10:13pm UTC](https://discourse.psychopy.org/t/unknown-resource-error-pilot-test/13727/15 "2020-06-02T22:13:37Z")

</div>

Are you specifying PhaseContingency[0] ? That would be the first character of the file name.

---

<div class="post-metadata">

**Author:** ![kthompson70](https://avatars.discourse-cdn.com/v4/letter/k/5f9b8f/32.png) [@kthompson70](https://discourse.psychopy.org/u/kthompson70)\
**Post date:** [June 2, 2020, 10:19pm UTC](https://discourse.psychopy.org/t/unknown-resource-error-pilot-test/13727/16 "2020-06-02T22:19:25Z")

</div>

No, how would I do that? I didn’t think that PhaseContigency needed to be altered in anyway since it only acts as the header, or “organizing parameter” for the jpg files when being accessed by PsychoPy.

---

<div class="post-metadata">

**Author:** ![wakecarter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/wakecarter/32/5753_2.png) [@wakecarter](https://discourse.psychopy.org/u/wakecarter)\
**Post date:** [June 2, 2020, 10:25pm UTC](https://discourse.psychopy.org/t/unknown-resource-error-pilot-test/13727/17 "2020-06-02T22:25:52Z")

</div>

Please could you show a screenshot of how you are using the variable?

---

<div class="post-metadata">

**Author:** ![kthompson70](https://avatars.discourse-cdn.com/v4/letter/k/5f9b8f/32.png) [@kthompson70](https://discourse.psychopy.org/u/kthompson70)\
**Post date:** [June 2, 2020, 10:41pm UTC](https://discourse.psychopy.org/t/unknown-resource-error-pilot-test/13727/18 "2020-06-02T22:41:03Z")

</div>

![image](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/8/c/8c2497ecfb0903dd97761a22fc0e8be2e9c7fd2d.png)

You can see here the name of this component is Decision\_Screen1. The component is then assigned an image based on the row I have selected from the PhaseContigency parameter.

![image](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/f/1/f1b92d28c1c405870172103cd686fd26209d0575.png)

You can see in this second image of the loop the component is inserted in, I have the loop selecting row 0, which when ran on my home desktop selects the DecisionPsychoPy.jpg as the first image in the list. PhaseContingency only factors in as the heading for the list that must be specified anytime I want to pull an image from the excel file.

---

<div class="post-metadata">

**Author:** ![wakecarter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/wakecarter/32/5753_2.png) [@wakecarter](https://discourse.psychopy.org/u/wakecarter)\
**Post date:** [June 3, 2020, 6:33am UTC](https://discourse.psychopy.org/t/unknown-resource-error-pilot-test/13727/19 "2020-06-03T06:33:56Z")

</div>

Try removing the 0 from selected rows to see if that’s the issue.

---

<div class="post-metadata">

**Author:** ![kthompson70](https://avatars.discourse-cdn.com/v4/letter/k/5f9b8f/32.png) [@kthompson70](https://discourse.psychopy.org/u/kthompson70)\
**Post date:** [June 3, 2020, 4:41pm UTC](https://discourse.psychopy.org/t/unknown-resource-error-pilot-test/13727/20 "2020-06-03T16:41:37Z")

</div>

When 0 is removed a random image from the excel file list is selected wit each loop iteration because a specific row hasn’t been specified.

[Next page](https://discourse.psychopy.org/t/unknown-resource-error-pilot-test/13727.md?page=2)
