integrate psychopy

154 views
Skip to first unread message

Kathrin Sadus

unread,
Jan 4, 2021, 12:35:49 PM1/4/21
to formr
Hi everyone,

I am new to formr but really excited about it so far. I managed to implement a diary study without any issues. Now I wanted to integrate a psychopy experiment (which is rather complicated and involves several stimuli and other resources). I didn't really find a lot of information about it, so I was wondering if anyone could suggest a good resource. I found the blog entry (https://www.grszkth.fr/blog/psychopy-ft-formr/), which suggested to use pavlovia. Is this the only way to integrate psychopy?

Thanks a lot in advance,

Kathrin 

grszkthfr

unread,
Jan 13, 2021, 5:51:58 AM1/13/21
to formr
Hi Kathrin,

glad you found my blog. :-)

FYI, I did not intend to suggest Pavlovia over other solutions. It just happens that I know both platforms and wanted to connect them. It worked flawlessly!

On top, I think hosting psychopy on other web services (e.g., formr) than pavlovia is not trivial. As far as I know, it is not well supported (and even worse documented).

If you decide to go for PsychoPy/Pavlovia and follow my blog, feel free to reach out if anything is unclear.

Best
Jonas

Kathrin Sadus

unread,
May 4, 2021, 5:49:44 AM5/4/21
to formr
Hi Jonas,

I decided to give it a shot, especially as I would like to integrate several experiments.
Following your blog, I created an external link module and added the following:
https://run.pavlovia.org/sadus/hmt_empra2021/html?code={{login_code}}

In the next step I defined the code field in the psychopy builder. I added a screenshot. It looks a little different compared to your blog (completion field is missing), which might be due to the version.

Now, I wanted to test, if the connection is working, but I get a "Not found" error in formr.
In pavlovia the experiment works, so it must be an issue regarding the connection.
Some background information: I used the run-mode to make sure I'm using the correct url.

Do you have an idea what could possibly cause the issue?

Thanks a lot!

Best,

Kathrin
Psychopy_formr.PNG

Jonas grszkthfr

unread,
May 4, 2021, 7:56:01 AM5/4/21
to formr
Hi Kathrin,

oh, I think this might happens due to changes the pavlovia/psychopy people did. As far as I can tell, this has nothing to do with formr.

I think the defaults used to be that the online experiment were stored in a folder named "html". Tthey might have changed that, so that now everything is run from the root directory of the experiment.
Anyway, I think you can check that for your project. In the screenshot you provide, have a look at the "online" tab. If the "output path" is empty (as it looks, see below), your html-experiment will be rendered to the root directory.

Thus, it makes total sense that https://run.pavlovia.org/sadus/hmt_empra2021/html?code=a1b2c3 returns a 404 as long as you do not have a folder called "html" with some content (e.g. your experiment when you set the output path accordingly).

However, if you link the following URL it should work as expected: https://run.pavlovia.org/sadus/hmt_empra2021/?code=a1b2c3
Please note the removed /html part.

Hope that fixes your problems. :-)

Good luck with your empra!

Best
Jonas

Kathrin Sadus

unread,
May 4, 2021, 12:54:27 PM5/4/21
to formr
Hi Jonas,

that makes a lot of sense! It works perfectly now.
Thanks for your support.

Best,
Kathrin
Reply all
Reply to author
Forward
0 new messages