Inter-Trial Interval (ITI) gets longer as the experiment advances

OS (e.g. Win10): Win10

PsychoPy version (e.g. 1.84.x): v2020.2.5

Standard Standalone? (y/n) : Y


I have a problem with the Inter-Trial Interval I am using in the experiment. Its duration should be always one second. However, it progressively gets longer until it lasts around 3 seconds.

Curiously, the output file (i am saving the onset/offset times of the ITI) shows a duration of 1 sec during the whole experiment.

The experiment has 464 trials. Trials are defined with a 3-routine loop. The routines are:

  1. Presentation of two colored triangles during 2 seconds. Here the participant must respond with a keypress in most of the trials.

  2. A feedback screen that appears for 3 seconds if the response is not correct (determined with a code component)

  3. An Inter-Trial Interval (ITI) of 1 second (I have used an ISI component in this routine)

The total amount of trials are organized in different loops that conform different tasks. In one, participants have to press A or Z depending on the colors of the triangles, in the second, they have to press K or M depending on the orientation of the triangles. In the third, they have to press the spacebar or not depending on whether a small square appears over one of the triangles.

A routine before the different trial loops contains 3 code components that determine 1) which xlsx conditions file has to be used; 2) the orientation of the triangles and 3) the position of the triangles on the screen. Both the orientation and the position are determined randomly and the result is written in the output file.

In the trials of the third task, there is also a code component in the first routine (the one that makes the triangles appear) that determines whether, and where, a small square appears. It gets one or the other value depending on the value that other variables have in that specific trial.

As I mentioned, the problem is that the ITI lasts for 1 second at the beginning of the experiment but, progressively gets longer and longer until it lasts around 3 seconds. It happens regardless of whether I run it in full screen or not.

This ITI problem happens when I run the whole experiment and also when I reduce the number of loops to do “quick” tests. However, when I run the whole experiment, other 2 problems appear. Those two problems are mainly that the length of some components is shorter than it should be. These two problems do not appear to occur consistently or to the same extent.


WARNING duplicate variable names: I have around 20 duplicated variable names. However, by using the same names in different routines y get an output file that is well organized.

WARNING User requested fullscreen with size [1280 720], but screen is actually [1920, 1080]. Using actual size. (this appears when I run it in full screen)

I would appreciate your help!

In order to have duplicated variable names your best option is to reuse the same routine (modified as appropriate using dynamic code) instead of creating very similar routines.

I get your second warning all the time – it doesn’t seem to be a problem.

I’ve stopped using the ISI component because it doesn’t work online. However, it should work locally. If your time is getting longer then maybe the issue is related to a calculation that takes a long time as the following trial begins (or as the ISI ends).

Thanks for your reply!

The fact is that I run a very very similar experiment before with no problems and that the calculations prior to each trial seem to be relatively simple. But yeah, that could be the cause.

I will try to simplify a bit those calculations and write again if that solved the problem, or see if somebody else has another idea on how to solve this issue.

Thanks again!


To find out whether the issue is the ISI or the following routine add a new routine after the ISI with, say, a text component which displays Please wait for one frame…

Hello @wakecarter,

This has been very helpful. The problem is not in the ISI but in the following routine.

Thanks a lot!