PsychoPy

Last modified by Iris Spruit on 2023/07/21 12:38

Introduction

PsychoPy is an open-source, Python based software package used for creating behavioral experiments. It features and easy to use graphical user interface. PsychoPy can be used for online research in combination with Pavlovia.

Availability, support and advice

PsychoPy comes preinstalled on labcomputers in the FSW (see the Software List to check which version). PsychoPy can be requested for work PC's via the ISSC Helpdesk. For unmanaged/personal computers PsychoPy can be downloaded here. SOLO provides only very limited basic support for PsychoPy.

Online

Psychopy offers the option to auto-translate your python code into JavaScript (or manually add JS), so that the experiment can be run online in combination with Pavlovia. However, you should be aware that not all features are available online, and that bugs still frequently occur. For a running overview of these issues, please consult the developer crib sheet and the forum.

Tips & Tricks

Syncing to Pavlovia from network drives.

Psychopy has the functionality to upload and sync (JavaScript compatible) experiments directly to Pavlovia.org.

1631267260535-237.png

Testing shows that this functionality works properly if the project files are located on the local C-drive. However, in some cases it does not work if the if the experiment folder/files are located on the network drive (e.g. in the P-drive). Throwing the following error:

1631267275043-238.png

By default, any project located on the P-drive will show the \\VUW\.. path when initially creating the project on Pavlovia from Builder:

1631267309303-176.png

There are two workarounds.

  1. Change this default path when first syncing to the shorter P:\  or J:\  notation, e.g.:

    \\VUW\Personal$\Homes\O\olferskjf\My Documents\Packaging\Psychopy\Experiments\BART

    to

    P:\My Documents\Packaging\Psychopy\Experiments\BART

    You can do this manually, or by clicking on the "Browse" button and navigating to the desired location.

  2. If the above does not fix the problem, move your experiment folder to the local (C) drive, and open it from there and then sync to Pavlovia.

FAQ

TopicQuestionAnswer

Error when syncing to Pavlovia

when creating a new project on pavlovia from the builder (or syncing to it), an error is thrown ending with "stderr: 'fatal: remote origin already exists".The workaround is placing your files on the local drive (instead of P or J-drive) or adjusting the default path. See here for further details.
Blank screen when running study in local browserRunning a JS study in the local browser, using the button in the builder, only shows an empty screen in the  browser.Make sure adblockers (like Ublock origin) are disabled or set to ignore http://localhost:12002/
2022.2.2 not syncing to PavloviaAfter installing the 2022.2.2 version, my experiments no longer sync properly to Pavlovia.In Experiment settings, make sure "Use PsychoPy version" is set to 2022 or 2022.2.2

Resources

Packaging

WhenTargetReportComments
10-09-2021Work-pc / Software CenterAAT reportSyncing to pavlovia from network drives does not work by default. For solution see here.
30-08-2022Work-pc / Software CenterAAT reportAdds some useful features (e.g. testing in local browser) and seems to have fixed the sync from network .