Display count of results so far in a bar chart on a second screen

What are you trying to achieve?:

I am carrying out a demo at a public science event where participants will do the following:
Look at two real objects.
Select the photo of one of them on a touchscreen
Then look at two more real objects, and select one.
Then look at a final pair of objects and select one.

I want to display the total number of times all participants over the day have selected object A (the one the researchers chose) vs object B (the other object) on a second display so that a running total of participant agreement with researchers is displayed across the whole day. It doesn’t matter if the second display is updated by trial but it should update at least once every 3-4 trials (at least once per participant).

I do not need each participant’s data to be separate so I can create an Excel file with every stimulus pair including repeats and just use a single file through the day: the whole day can, if necessary, be treated as a single participant. Or I can stop and start the experiment but I’d still like all of the day’s participant data to be displayed - because I don’t know the N, this would probably be better as a proportion of participants who chose image A vs image B over all the pairs of images.

I DO need to save the day’s data by item chosen, at the end of the day.

What did you try to make it work?:

I have adapted a forced choice study I found on Pavlovia so it displays a pair of pictures, and you click on one with a mouse, and it then goes on to the next pair of pictures, and in the data file the image clicked is recorded. This would be fine if I just wanted to save the study for later analysis.

I found this:
https://discourse.psychopy.org/t/progress-bar-for-igt/34725/7

which seems to be a start, but I’m unsure how to adapt the counting bar to show count of responses in category A or B, and how to show it on a separate screen.

For display on a screen I can see this

https://discourse.psychopy.org/t/display-and-flip-frame-on-the-second-monitor/40999

but I don’t have any data or image yet to show on a second screen so I’m saving that for the moment. My images are currently set to show centre left/centre right so for the moment I could show them top left and top right and show my bar chart bottom middle.

I can link to the pilot version of the experiment which is at

https://pavlovia.org/kjalcock/picturechoice

but though it is running on my laptop it isn’t running on Pavlovia (I get 403 forbidden error) and won’t sync (I get Unhandled Internal Error and the following is the latest traceback).

Traceback (most recent call last):
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.8/psychopy/app/builder/builder.py”, line 1612, in onPavloviaRun
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.8/psychopy/app/builder/builder.py”, line 1608, in onPavloviaSync
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.8/psychopy/app/pavlovia_ui/project.py”, line 854, in syncProject
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.8/psychopy/projects/pavlovia.py”, line 873, in sync
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.8/psychopy/projects/pavlovia.py”, line 1110, in firstPush
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.8/psychopy/projects/pavlovia.py”, line 1269, in commit
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.8/git/cmd.py”, line 542, in
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.8/git/cmd.py”, line 1005, in _call_process
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.8/git/cmd.py”, line 822, in execute
git.exc.GitCommandError: Cmd(‘/Applications/PsychoPy.app/Contents/Resources/git-core/git’) failed due to: exit code(1)
cmdline: /Applications/PsychoPy.app/Contents/Resources/git-core/git commit -m Push initial project files
stdout: ‘On branch master
nothing to commit, working tree clean’

Do you have the latest version of PsychoPy?

For this task I would use the shelf, with an entry with designer scope. That way each participant’s choices could be uploaded to a dictionary (or a simple list) and then downloaded and presented by a different experiment.

I checked my version and it was, indeed, not the latest version. I’ve upgraded, and updated the version in the experiment settings, but still get this error when syncing (latest Traceback) (I’ll move on to using the Pavlovia Shelf when I have a working online experiment!)

Traceback (most recent call last):
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.10/psychopy/app/builder/builder.py”, line 1612, in onPavloviaSync
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.10/psychopy/app/pavlovia_ui/project.py”, line 854, in syncProject
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.10/psychopy/projects/pavlovia.py”, line 912, in sync
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.10/psychopy/projects/pavlovia.py”, line 1149, in firstPush
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.10/psychopy/projects/pavlovia.py”, line 1315, in commit
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.10/git/cmd.py”, line 986, in
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.10/git/cmd.py”, line 1598, in _call_process
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.10/git/cmd.py”, line 1388, in execute
git.exc.GitCommandError: Cmd(‘git’) failed due to: exit code(1)
cmdline: git commit -m Push initial project files
stdout: ‘On branch master
nothing to commit, working tree clean’

The version in Experiment Settings should be blank unless you specifically need to use a different version.

Removing the version number in the builder hasn’t helped, either, unfortunately.