Index Error: index 1 is out of bounds for axis 0 with size 1

Hello Friends,
I need some advise from you. I have made one program for gustometer with psychopy GUI. That program was running really fine. There was no error, but suddenly I got o ne error and nothing is working. I just installed timer module ‘pip install timer’ for Olfactometer serial communication, after that nothing is working. My program is not having problem. It is showing some problem in windows.py file which I have never touched. I am sending you the trace back. I will be grateful to you if some one can give me some advise on it. I am using Psychopy v1.83.04 and python anaconda 2.7 64 bit on windows 10, 64 bit.

Traceback (most recent call last):

File “”, line 14, in
extra_info=exp_info, iti=1, t_inter_blocks=1, outdir=outfile)

File “”, line 78, in run_experiment
iti=iti, outdir=outdir, block_number=i)

File “”, line 96, in run_block
win.color = [0, 0, 0],

File “C:\Users\Ravi\Anaconda2\lib\site-packages\psychopy\tools\attributetools.py”, line 27, in set
newValue = self.func(obj, value)

File “C:\Users\Ravi\Anaconda2\lib\site-packages\psychopy\visual\window.py”, line 1212, in color
self.setColor(color)

File “C:\Users\Ravi\Anaconda2\lib\site-packages\psychopy\visual\window.py”, line 1257, in setColor
GL.glClearColor(desiredRGB[0], desiredRGB[1], desiredRGB[2], 1.0)

IndexError: index 1 is out of bounds for axis 0 with size 1

Sincerely,
Ravi

1 Like

Try removing the comma after the list here. It means you won’t get a list of length 3 as probably intended but instead a tuple of length 1.

Michael,
It worked really fine after removing the comma.
Thank you very much for the advise.
Ravi