psychopy.org | Reference | Downloads | Github

Path related issue

URL of experiment: Pavlovia

Description of the problem:
Hello,
My experiment works well offline in my PsychoPy Builder on my Windows machine. But it does not work online when I test it in Pilot.
It gives me this error:

As you can see, it cannot recognize the png image, while the path is fully correct.

I am wondering if anyone faced a similar issue before?

Thanks,
Reza

Have you tried converting to another format, say, jpg?

Hi, thanks for your reply. No I did not. the thing is that it was working for my first pilot. I changed some parts of the experiment, but they are not related to the directory or pathes.

Do you have all of your images in the same folder as the experiment file? I understand that PsychoPy online doesn’t let work with relative paths.

Best wishes,

Wakefield

Hi, thanks for your reply.
My folders are like this


I have all my images in ./maps/train/
And saved all paths in the CSV files.

It was working around one month ago when I have done my first pilot. But, now it does not!

Best,

@apitiot
Hi Alain,

Would you please help me on this issue?

Many thanks.

Reza

I’m now getting the same error in local debug mode, but my image is being found when piloting on Pavlovia.

Hi,
Thanks for letting me know.

Would you please show me how you define relative path and CVS file containing paths (if you have)?

Thanks in advance.

@jon
Hello Jon,
Would you please help me to fix this issue? I need to start my experiment very soon.

Thanks a lot.

I think the issue is just that you’ve referred to the path as
./train/02 - map.png
which then maps onto a url like
https://run.pavlovia.org/user/study/./train/02 - map.png
(note the dot in the middle). That won’t make sense in a browser.

In PsychoPy/Python the path is going to be treated as relative anyway, so you don’t need or want the unix-style ./ at the beginning.

On top of that definite issue, I don’t know what will happen to your filename given the spaces. That’s also something that could end up causing trouble - URLs can’t have spaces and I don’t know whether these will be intelligently converted to the internet space character ("%20"). They might be OK but they might not

Hi,
Thanks for your reply.
I removed dots and spaces in the relative paths and push the new file into gitlab. But, when I run the experiment pilot, it still uses the last version. So I cannot check whether the issue was fixed or not. I also signed out and signed in again, and even checked with a different browser, but pilot runner still uses the previous version of paths. Is there a way to delete the pilot/run experiment cash or force it to use last version of data in the gitlab?

cheers,

Possibly it’s just cached in the browser. Try forcing a reload of the whole page with Shift-R. Pages (and their associated javascript) are typically cached and re-used.

To fix the cash issue, simple tricks did not work. So, I had to transport my project to a new repo. Now it works. I defined the relative paths like this: maps/test/image.png
Without dot and / in the beginning.

Many thanks.

Cheers