Description of the problem: hello! I am trying to pilot test my experiment. However, I keep having the error depicted below: Cannot use ‘in’ operator to search for ‘status’ in undefined at Scheduler._currentTask
The code is as below also:
var thisComponent = {};
for (const thisComponent of instructionComponents)
if ('status' in thisComponent)
thisComponent.status = PsychoJS.Status.NOT_STARTED;
return Scheduler.Event.NEXT;
};
}
I thinj the problem is because somehow the “thisComponent” variable is not an object, but its a string. But I really dont know how to make it an object in a proper way, because it has many different attributions other than ‘status’ down in the code.
After some more piloting, I realized it’s doing this when I have several timed objects. For example, if I make 1 dot appear for a short period of time before disappearing, it works. But if I try to make two dots flash one after the other, then it gives me the error above. Any ideas on how to fix this?
I’ve been dealing with the same issue- the same routine operates perfectly in isolation or even at the beginning of a long set of routines- but when placed after other routines i get the following error
index-size-error.ts:727 TypeError: Cannot use ‘in’ operator to search for ‘status’ in 2
in js component it corresponds to this line
for (const thisComponent of instructions_actionsComponents) if ('status' in thisComponent) thisComponent.status = PsychoJS.Status.NOT_STARTED; return Scheduler.Event.NEXT; } }