-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
self-paced-reading doesn't record data #75
Comments
Yes, a MWE would help. It has been a while since I worked on this code. But running my example does give me one data line per word in the sentence. Looking at the code, the end_trial function only triggers on the final word (as you observed), but the data to the earlier words in the sentence are saved via this.jsPsych.data.write. What is in the results file at the end? |
I hadn't noticed this before. This isn't technically a supported use case for |
I'm fairly confident that's the issue: pushkin-consortium/pushkin-client#38 (comment) I was making a MWE for posterity. And I'm also working on a pull request that should fix this. Based on the docs, I was planning on using |
OK, here's the MWE: https://github.com/jkhartshorne/jspsych-test-spr The critical bit is
If you watch the console.log, you'll see that when |
No, that will add the data to all trials. Mainly used for things like subject IDs, condition assignment, etc. I'd recommend modifying the plugin to remove calls to I do think some of the changes we are making to version 8 may allow us to explore more flexible data models. @bjoluc it would be interesting to consider whether to add a method to write a row of data before a trial is finished. |
@jodeleeuw -- my turn to complain to you about cross-platform compatibility. Apparently it's not trivial to get canvas installed on an M1 chip. As I learned here, users of M1s and M2 need to first run
It may or may not be necessary to also globally install node-gyp using your favorite package manager (yarn or npm, etc.). I did just to check that I could get it installed, so I don't know if it's necessary. I'll add that to the docs and give you a pull request. |
I'm not entirely sure how to test this locally, but the tests work. (Or at least they did after I rewrote them.) |
Sadly, it's not trivial to get canvas installed in many circumstances. Canvas is a dependency of
@jodeleeuw Interesting idea, but would require some thought and might add a lot of complexity for an edge case (?) that can also be solved by plugin code. Not something I'd like to maintain, I think 🙃 |
I overlooked that the self-paced reading plugin tests need |
Or accept my pull request. |
Yes I saw the PR, thanks. |
@jodeleeuw @igmmgi
I think that the self-paced reading plugin fails to trigger any of the events normally used to save data (such as
on_trial_finish
oron_data_update
on any of the words except the last one.You can find our timeline herehere.
Now consider:
Critically,
console.log
only triggers on the final word of a sentence:If I have time, I'll try to come up with a minimal working example.
The text was updated successfully, but these errors were encountered: