empiricaly / empirica

Open source project to tackle the problem of long development cycles required to produce software to conduct multi-participant and real-time human experiments online.
https://empirica.ly/
Apache License 2.0
47 stars 8 forks source link

playerRounds data not saving #466

Closed aliciamchen closed 10 months ago

aliciamchen commented 10 months ago

Is there an existing issue for this?

What happened?

The data I wanted to save in playerRounds is empty in the csv when I do empirica export. This has not happened to me with previous versions of empirica, with the same experiment code.

The data does log to the console (e.g. when I call player.round.get("attribute") in callbacks), and also doesn't prevent the experiment from progressing (I need to access this information for the game to continue); it just doesn't show up in the csv.

Steps To Reproduce

No response

Empirica Version

Version: v1.8.11
SHA:     fce31f9
Build:   154
Branch:  main
Time:    2023-12-20T10:26:18Z

What OS are you seeing the problem on?

macOS

What browser are you seeing the problem on?

Does not apply

Relevant log output

No response

Anything else?

No response

Code of Conduct

aliciamchen commented 10 months ago

I think what is happening here is that within a round it's saving the first value of the attribute, but as its value updates through the stages within the round, it doesn't write that value (but what I want is it to write the last value, at the end of the round / after all the stages)

npaton commented 10 months ago

I believe this should be fixed in the latest release. It managed to reproduce a case where data update "un place" would not save. I think this is what you're seeing, but I'm not 100% sure, since I don't know exactly where you're changing this data. Here are the release notes explaining this in further detail: https://github.com/empiricaly/empirica/releases/tag/%40empirica%2Fcore%401.8.12

Let me know if this makes sense, or if you can point me to where the data is updated in your code, and I can confirm this is the problem. Thanks!

aliciamchen commented 10 months ago

Thank you! I'll try it again

aliciamchen commented 10 months ago

This is fixed, thank you!