CSV and psydat files are not created if the experiment runs until the end

OS: Win10
PsychoPy version: 2022.2.4
What are you trying to achieve?: I’m trying to get the csv and psydat files at the end of the session

What did you try to make it work?:
Issue 1: I only get the files if “Esc” is pressed in the middle of the experiment. We’re bypassing the issue by adding a routing with “thank you” text with no keyboard and then we press “Esc” to exit the experiment. This is the only way we get the files we need with our data.

Issue 2: Differences in behavior between local (python) and online (JS). In the local version the experiment works perfectly. Keyboard responses are collected and the behavior is changing accordingly in the Each Frame - when the correct key is clicked, the falling cue becomes white (in most trials, as it should). When moving to online, the cue does not turn white as if none of the keyboard responses are collected in the Each Frame part. The responses are recorded in the data file.

Please help.

Attached, the experiment.
em_basic.zip (1.4 MB)

When running experiments online you should have an end condition (time or user response) for your final routine other than pressing escape. The last time someone had an issue with data saving when ending normally, it was because they had some conflicting code in “End Experiment”.

In your case your online version will probably be failing because your code components are Python only. You need to change them to Auto (apart from where you are importing shuffle, though I don’t think this is necessary offline – I use it a lot and never import it)

Thanks for you reply @wakecarter.

Yesterday I updated this same experiment with another issue which is for the online version. I may have created some mix-up so here is a more detailed description of the 2 issues.
The first issue happens with a local exp (pyhton based). The data is saved only if I use Esc to end the experiment. That is the reason there is no end condition. When I let the last routine (thank you screen) end with a timer or by pressing “space” both data files (psydat and csv) are not saved, only the log file is saved. This is the first problem. Btw, I fixed the online issue on a copy of this experiment so that it will have a standard end to the exp with no Esc key.

The second issue is more internal to the experiment. In this experiment there are 2 falling circular cues in 2 of 4 potential locations. They locations are connected to 4 keyboard keys S, D, K, and L. The subject needs to press either of the keys corresponding to the 2 locations of the falling cues. If he succeeds, there’s a change he will see the falling cue he pressed flashing in white. The experiment works perfectly in Python on the local computer but online the white flashes don’t appear. It seems there is a problem on the Each Frame tab of the code components with the pressed key logic which causes the whole logic to fail. It doesn’t get the key pressed…

Thanks,
Rani