psychopy.org | Reference | Downloads | Github

First online experiment

Hi,

I’m trying to create a simple online experiment, and appear to have struck doh! at the first attempt.

I set up a simple loop with the conditions contained within a CSV file, with the idea of displaying a phrase for 1 second on screen, before moving to phrase 2 etc…

I exported the html - and transferred the html folder to C:\TEMP\HTML

Given that I didn’t have access to a webserver I started one locally using the instructions here
http://jasonwatmore.com/post/2016/06/22/nodejs-setup-simple-http-server-local-web-server

then fired up the webserver and pointed my browser to http://localhost:8080

I see the landing page asking me for my subject ID, session number, but the OK button is permanently greyed out.

What am I doing wrong?

Any help would be much appreciated.

Cheers, Jon

Hi,

Further information: I have tried “simple” http servers installed locally - like the one I listed under node.js, and SimpleHttpServer under python, both showed the landing page, but the OK button was greyed out.

I have got the html output from PsychoPy to work by dropping the folder into the relevant space on an Apache server.

For the purpose of testing the first option (local webserver) would be much simpler, and I wonder if there are any specific requirements for the web server?

Cheers, Jon

Simple webservers don’t support PHP.

I am suitably embarrassed.

Then I did a search for “simple webserver with php support mac”, and this popped up:

It turns out that (on macOS Sierra) you only need to change directory to the html folder built by PsychoPy and type:

php -S localhost:8000

then point your browser towards http://localhost:8000 and it will serve up the necessary files for you to test your online psychopy experiment.

Cheers, Jon

1 Like