How to directly read file on pavlovia

Hi @Xinzhu-Fang, the above code is tested and works ok for me, so perhaps something else is going wrong? Btw, you could also just use the trialHandler code for loading csv files. E.g.,

myList = new TrialHandler({
    psychoJS: psychoJS,
    nReps: 1, method: TrialHandler.Method.SEQUENTIAL,
    extraInfo: expInfo, originPath: undefined,
    trialList: "tExp.csv",
    seed: undefined, name: 'myList'});

aValue = myList.trialList[0]['variableName']  // Get value from row 0

Regarding the readPixels error, what is displayed when you run the following in your browser that runs your task?

https://www.khronos.org/registry/webgl/sdk/tests/conformance/more/functions/readPixels.html?webglVersion=1&quiet=0

1 Like