The code written in Psychopy v1.85.6 does not work in the new version PsychoPy3 v3.2.4.
I get an error
line 27, in
random.shuffle(stimlist)
File “D:\psychopyinstall\lib\random.py”, line 274, in shuffle
for i in reversed(range(1, len(x))):
TypeError: object of type ‘zip’ has no len()
I also want to create a virtual environment for PsychoPy so that I won’t have version problems, but I do not know how to do it, I would appreciate it if you can give me some information about how to do it.
First could you guide us in how to create a virtual environment for PsychoPy, so to overcome version problems,
Also related to your solution
I have Python3 version 3.7.3
and PsychoPy3 v3.2.4
The code was written in an earliear version of Psychopy - v1.85.6, therefore as you mentioned we are having these problems due to version differences.
When I changed the code
for i in reversed(range(1, len(list(x)))):
I get this new error due to random.py
File “D:\psychopyinstall\lib\random.py”, line 277, in shuffle
x[i], x[j] = x[j], x[i]
TypeError: ‘zip’ object is not subscriptable
the error is related to the code in line 27, in random.shuffle(stimlist)