i am using the latest Psychopy version on windows 10. I tried to build a block design like the one in the demo. In the outer loop i have a header which then lists xlsx files beneath. In the inner loop, the demo uses
$header to then calsl the xlsx files from the outer loop.
So instead of calling the xlsx directly for the loop, i call $header which should give me random input from xlsx. 1-4. Problem is, that calling the xlsx with $header is not working. It say “header” is not defined.
Is this Block demo still up to date or did anything change?
Have you tried running the experiment anyway? I have a similar design, where the inner loop component says ‘conditions file’ not found, but when I run the experiment it behaves as expected, picking up the conditions file from a colomn in the block file.
It is not running. At first this morning it looked like it is running. But the inner loop failed to correctly perform what it should be doing. I tried to fix it, and now again i cannot run the experiment cause it says that a condition is not defined. It is defined within a file that should be opened thrpugh the outer loop.
outer loop:
header
file1.xlsx
file2.xlsx
inner loop
$header (should e.g. then be advised to call file1.xlsx right?)
It seems to be a general definition problem. I get an error even without using an outer loop.
Saying that variable x is not defined. But it is defined…
That explains what you want (a sound played in the inner loop defined by a parameter from an Excel loaded by the outer loop). However, to help you I’d need to see screen shots of loops/components and pasted code so I can see exactly how you have tried to achieve your goal.
I think what I want to do is not possible. I wanted the outer loop, so blocks, to go over all the Parts 4 times. So going through everything (target, trial and deviant) and then repeating it with different inputs.
I can’t see Target2 in your flow. However, if that is in a Begin Experiment tab of a code component then that’s before the variable Zielton is available. When you create a routine with a variable set to every repeat it gets initially set to undefined