PsychoPy Version: 2022.2.2
URL of experiment: Adrian Jusepeitis / cbtest · GitLab
Description of the problem: I am trying to access a dictionary record in my shelf in a very simple example experiment but I can’t seem to read any values out of it.
The record looks like this
and the code in my experiment is
groups = await psychoJS.shelf.getDictionaryFieldValue({key: ["counterbalancing"], fieldName: "group"})
counters = await psychoJS.shelf.getDictionaryFieldValue({key: ["counterbalancing"], fieldName: "counter"})
console.log(await psychoJS.shelf.getDictionaryFieldNames({key: ["counterbalancing"]}))
console.log(groups)
console.log(counters)
Looking into the console, I see that every log is just “null”.
I tried this simple example because everything more complex, like the demos concerning the shelf, did not work for me. E.g., the counterbalancing demo gave me the error “unable to find a record associated with the given key” despite the fact that I created the needed dictionary record and named it correctly.
Any advice on how to get this working is appreciated!
Adrian