psychopy.org | Reference | Downloads | Github

Unknown Resource for Image and condition files

URL of experiment: https://gitlab.pavlovia.org/JLandsiedel/intexp_v1 & https://pavlovia.org/JLandsiedel/intexp_v1

PsychoPy 2020.1

Description of the problem:

Hi all,

Apologies for opening a new topic on this. I have read through most of the previous topics and tried their solutions but it has not help so far.

My problem: After successfully setting up my experiment in PsychoPy, I wanted to set it up online. I am able to compile my experiment, sync with Pavlovia and have added all necessary stimuli and files in the resources folder. I have tried to pilot both locally and online but am not getting very far into the experiment.

Participants should first see an information sheet on the first screen but this does not work at all when piloting locally Unknown resources error for Consent/InfoSheet.png. Online it does not give an error message, however, the image is NOT shown, online a text component, and I am able to switch to the next screen. The next screen would be where participants give consent. When piloting online again, the image Consent/ConsentSheet.png does not show but strangely two symbols Consent/cross_small.png and Consent/tick_small.png appear and are clickable. The strange thing about this error is that all of the above stimuli are within the same folder.

If you go to the next page by clicking on the tick it goes to the next page with text instructions. Going on from there gives another resource error for the first demo of a trial:

Unfortunately we encountered the following error:

  • when importing condition: /ConfigFilesUnix/R1_CI1_IntObservationRando/R1_CI1_IntObservationRando_DEMO.xlsx
  • when getting the value of resource: /ConfigFilesUnix/R1_CI1_IntObservationRando/R1_CI1_IntObservationRando_DEMO.xlsx
  • unknown resource

I am pretty certain that the problem is not a typo or missing files. I would greatly appreciate your help as I am out of ideas what else it could be.

Many thanks,
Julia

Okay after playing around with things and reading more in the forum I have found the solution to my problems.

The Unknown Resource problem for my consent form was due to the positions which I specified in variables. Once I specified the positions manually in the dialogue box or for other stimuli in my conditions file separately for x and y (see other posts on this), it worked.

It was trickier to resolve the condition file error and it was a combination of clearing my browser cache and other things to make it work.

Thanks for sharing your solution. I am having a similar issue with images and conditions files. Any tips for resolving the condition file error?

It would be useful to know a bit more about how you coded it in order to have an idea what the error might be.

Is it a loop within a loop where you specify the condition file in an inner loop?
Do you specify the condition file path+filename in the dialogue box or as a variable through a code snippet?
Have all your resources synced successfully online/did you copy the condition file into the resource folder?

Have you looked at other forum posts which talk about solutions in more detail (below links are just two examples I picked)?

Cheers,
Julia

Don’t: Use an array in an Excel file for locations or colours.
Do: Use separate variables for x and y coordinates, e.g. $(x,y) or separate r, g, b values for separate colour values.

Thanks for your reply and the links @Julia_Landsiedel. It sounds like we got similar errors but maybe for different reasons. Those cases don’t necessarily apply to my experiment but it is good to know as I troubleshoot.

Thank you @wakecarter, I have been using that sheet and it is super helpful. I don’t think the excel file contents are what is causing my error (no arrays).

I have adjusted my conditions files and experiment according to the sheet. I don’t use arrays (I do have text stimuli that contain commas - could this derail the experiment somehow?). I checked multiple times for any typos. I am still getting the “Unknown resource” error. Interestingly, it happens only if I try counterbalancing using this:


When I have one of the (very same) conditions files fixed in the loop, it works properly.

Locally, I have also noticed a problem when I type the conditions file name in the loop instead of using the browse function (it does recognise the file from the code above, though). Could this be related somehow?

Unknown resource happens when you specify a resource in code. You need to download them either in the JS code block or from the online tab of the experiment settings.

3 Likes

Ah, there. The crucial piece of information that I missed. Thank you!