URL of experiment: RejTask_FinalVersion [PsychoPy]
Description of the problem:
For a few months, we have been running a task that requires participants to submit a collection of photos that are fetched by the task using string handling with their study ID # under a specified path (e.g.: id#/id#_Images/id#_1.png), and the task is told which photos to run when using a csv file which is also retrieved by string handling. Upon trying to run our final batch of participants, we received messages from everyone stating that they encountered this error message:
Unfortunately we encountered the following error:
*** when setting up a preload queue**
*** unable to download resource: Participant_Images/ID#/ID#_trials.csv (Participant_Images/ID#/ID#_trials.csv)**
Try to run the experiment again. If the error persists, contact the experiment designer.
This doesn’t make sense, seeing that these participants’ images and csvs exist on the Pavlovia repository. The filenames and file extensions of these folders/ files are generated by a local python script that allows us to organize subject folders in batches, so there is no possibility of misspellings or wrong extensions being used. Participants are given their link via Prolific using their Prolific ID, so there is no possibility of their ID number or the task URL being entered incorrectly.
Normally, I use a test folder to troubleshoot to discern whether errors we encounter are internal or external issues. I ran my ‘test’ folder using the RUN url (linked above), and it worked with no problem. However— when I navigated to the ‘test’ folder on the Gitlab repository, I noticed that the folder that is supposed to store the photos (test_Images) isn’t there.
We do push changes to this repository via Github so it’s possible one of us may have accidentally deleted the ‘test’ folder while pushing. But the task obviously shouldn’t be running under ‘test’ if the ‘test_Images’ folder isn’t there. So this leads me to believe that this may be a server issue? Is it possible that there is a discrepancy between the contents of the server and the contents of the Gitlab repository, in that changes made to the Gitlab repository aren’t be reflected onto the server? If true, this would explain why the task isn’t running for those new participants.
Any thoughts/ guidance on this would be greatly appreciated.
Thank you very much!
Just to follow up and add to this––if we pilot the task and use a prior participant ID for whom the *_trials.csv exists, but for whom the images no longer exist in our gitlab repository (because we delete them after participants complete the study), the task runs fine, seemingly with participant images that we have deleted. This shouldn’t be happening as far as I can tell, leading me to believe that there may be a significant lag time between changes that we push to our gitlab repository and those changes getting reflected on pavlovia’s servers. I’m not sure if this potentially has to do with some kind of error on our end that we are not seeing, or if it is just something about the way pavlovia’s servers operate. But if someone on the development team could look into this and get back to us, that would be much appreciated because this is significantly impacting our ability to complete a grant-funded study.
From Troubleshooting Online Studies — PsychoPy v2023.1.2
Running the latest version of your experiment
When you synchronise changes to your experiment, you may need to clear your browser cache to see those changes online (using Ctrl-F5, Ctrl-Shift-R or equivalent). If this does not work use an incognito browser tab. A participant will not need to do this, so long as they have not already tried a previous version of your experiment.
If you are making edits to Gitlab directly, they are likely to be lost the next time someone presses sync in Builder. The CSV file will need to be attached via Experiment Settings/Online in Builder or a code component running prepareResources (see Resources in online studies — PsychoPy v2023.1.2 and PsychoPy Code Component Snippets - Google Docs)
I don’t think you are describing a server issue.
Thank you for your quick reply. We are making edits to gitlab directly, not going through Builder. Nothing has been synced via Builder since the initial push of our code to gitlab, and nothing with the code is changing. The only things that are changing are resources for the experiment (i.e., visual stimuli that are participant specific and the associated .csv file for that participant that specifies a unique trial order). We have collected data from approximately 70 participants successfully doing things this way. We have run into this same ‘unable to download resource’ error before for files that are present on gitlab; the last time it happened, after a day or two it miraculously seemed to fix itself without our doing anything or pushing any additional changes, so that is why our thought was that even though we currently see what we would expect to see on gitlab after uploading new participant-specific files, perhaps those changes have not yet been reflected on the actual server for some reason, hence the unknown resource error. Is there any way we would be able to check this?
Also, just to clarify, I just cleared my browser cache and also tried a different browser, and still was receiving the same error.
I’m sorry to follow up again, but if any of the developers may have any insight as to why we are experiencing this problem/error, I’d really appreciate it; this project is for a graduate student’s thesis and we’re almost done, but can’t finish without these last 13 participants. It is not a browser cache issue, as I tested the previously suggested solutions. And I just tried to run it again, thinking perhaps with more time something might have changed on the server, but still no luck––still not recognizing files as present that I can see in our gitlab repository.
Hello @melanieziur , @dfareri ,
Looking at the participant-facing repository, it appears that a variety of participant directories have been deleted, more or less manually, and some have been added through merges, and some have been renamed, but not all of them are tracked.
This is consistent with your updating files via GitLab, e.g. by merging from other experiments, rather than by syncing from builder while the experiment is running, i.e. while results are been collected and pushed.
The issue stems from your local repository, the GitLab repository, and the participant-facing repository finding themselves with different files: the participant-facing repository and the GitLab one have now diverged and need to be reconciled.
I have made a copy of your experiment repository, and have attempted the reconciliation process. This is very tricky and indeed there are many conflicts that I cannot manage, e.g. in GenerateParticipantFolders.py (since I do not know what the correct version is).
At this point I would encourage you to go to your experiment page on pavlovia.org, download all results and make sure that you have them all (again, I made a copy of the repository so that no data will be lost), change the status of your experiment to INACTIVE, which will get rid of the participant-facing repository, and then change it back to RUNNING. That should ensure that the participant-facing repository is in the correct state.
Does that make sense?
Thank you so much for your comments/suggestions & for looking into this. It is very much appreciated.
Your explanation makes total sense. We will implement your suggestion of making the experiment inactive and then changing it back to running ASAP, and will chime back in if we run into any issues.
One quick follow-up question, though. Given the complexity and the design of our task, continuing to push any changes via builder is not a possibility for us, which is why we created this workflow from github to gitlab. However, how might you suggest we avoid these kinds of issues in the future? I have another study planned that uses a similiar manipulation and will likely require the same sort of setup, and I would want to avoid anything like this continuing to happen.
Thank you again,
Which step means you can’t sync from Builder? If I was loading bespoke stimuli, I would include the participant code in the filename, add them to the stimuli folder and then sync.
The experiment would be set to prepare and use appropriate resources in a code component based on the participant code.