Hello! I am currently playing around with the new builder eye tracking components (they make eye tracking setup a breeze!), and I’ve gotten stuck when trying to create more than one TrialHandlerRecordTable in the same experiment.
Basic info about the task:
I created a basic testing design, with a loop called trials and a routine within, where i called ioServer.createTrialHandlerRecordTable(trials). This loop used an excel file just to register some dummy variables
Description of the problem:
Everything was working just fine, but when i added a second loop that called createTrialHandlerRecordTable a second time to create a second table that gathered the variables of my second loop (say, ioServer.createTrialHandlerRecordTable(trials_2)), it did not actually create the second table; the Runner raises a KeyError (code below).
File "D:\Descargas\EyeTrackerBETATESTING\BETATEST_lastrun.py", line 524, in <module> ioServer.addTrialHandlerRecord(thisTrial) File "D:\Descargas\Psychopy3\lib\site-packages\psychopy\iohub\client\__init__.py", line 644, in addTrialHandlerRecord data.append(cv_row[cv_name]) KeyError: 'TestVariable4'
Perhaps ioHub is unable to create more than one table for appending into the hdf5 file? (thus the KeyError would maybe come from an assignation of the differently named variables of the second loop into the table that has columns representing those of the first one.
If i disabled the creation of the second table, and only called ioServer.addTrialHandlerRecord(thisTrial), the values of the new rows are the same of the last trial of the first loop; image for reference
Is there any other way to create several ioHub TrialHandler tables? Since the main utility i’m trying to accomplish is labeling eye tracking data, a workaround for this problem could be using messages to send the values of the different variables in the loops to ioHub and then using pandas (or R) to extract the different values and correctly label each eye tracking refresh