This sounds like something happens between your practice trials and your experimental trials that changes corr from being a list to being a number (e.g. resetting the variable by using corr = 0, instead of corr = []). If I was you, I would open the .py file in a text editor and search for corr to see if there is anything happening to the variable that might cause this.
Also, do you coincidentally use this variable name for something else in your experimental trials?
Yeah I do. That is very weird, because previously I have corr = [ ] working fine across two sets of experimental trials previously but adding in the practice trials have caused an issue. I’ll change the name and see