Online data won't save and sessions are aborted

URL of experiment: AX Discrimination2 [PsychoPy]

Hello again, you might remember me as I asked something on the forum a week ago, and you guys helped me a lot (thanks again!).

So I have a new issue which apparently is quite common but I couldn’t find a satisfactory answer (especially since I know nothing of coding).
When running my experiment online, data is not saved, I only get an empty excel spread sheet and the experiment is considered as aborted by pavlovia even though I get the green “thank you for your patience” message.
I read that such data as stimuli start time is not saved online but is locally, and I that I should add a code component, but since I am a noob in coding, I don’t know what to write in it and where in my flow it should be added.

The only data I need is which key is pressed, and when.

Could you help me with this?

1 Like

Hello David,

the link to the experiment does not help. Either provide the link to the repository or sow us where and how you record key-presses. I assume that you find RTs and key-presses when running locally, don’t you.

Best wishes Jens

My bad, here’s the link to my repository: Sign in · GitLab
Indeed, I get exploitable data when I run the experiment locally, but online, I get an excel file that looks nothing like I wish it would, as you can see on the screenshot below:

Hello David,

there are two reaction times (PressSPACEBAR.rt, key_resp_4.rt) recorded in the first trial of your result-file but not in later trials.

Do these two RT come from acknowledging an instruction or from a trial?

Did you tick the is trial box for the MainTrialLoop?

Best wishes Jens

Hello, thanks for your answer,

The reaction times you mention come from instructions (there is a third one later in the flow but apparently it’s not appearing on the excel file). I expected two other reaction times, which stem from two loops (PracticeTrialLoop and MainTrialLoop), as well as which box was clicked (my inputs are buttons).

Both “is trial box” were ticked.

Hello David,

buttons do not yet work online

Best wishes Jens

1 Like

Ok so I changed my input to a key press and it seems to work, I get the key that is pressed and the reaction times just fine !

Just another question though, when I quit the experiment (and get the “thank you for your patience message”), my session is still marked as aborted. What can I do to have pavlovia mark it as finished?

Hello David,

when a problem is solved it is best to open a new topic :wink: But anyway, do you wait and click the ok, when you see the Pavlovia end message?

Best wishes Jens

My bad, I didn’t want to flood the forum with countless questions.

Yes, I usually wait a few seconds before I press escape, then I get the message, and I press ok.

I wouldn’t recommend ending an experiment on escape – since that means aborting. You should have a key press to end the experiment by reaching the end of the flow.

Yes, I read that I should add a code component, but since I know nothing of coding, I don’t know what to write in it (I tried core.quit but that didn’t work).

Are you deliberately wanting people to abort the experiment before the end?

The whole point is that I want them to quit the experiment so that their session is marked as completed and not aborted. Because right now, my last routine is a Thank you message, but there’s no way for people to quit the experiment without pressing escape (or I guess close the window but from what I’ve experienced data won’t be generated).

The thank you message needs to either end after a time limit or a key press or a mouse click

Once again, thank you all for your help, I made the last message last for a couple of seconds, and the session was successfully completed.