psychopy.org | Reference | Downloads | Github

staircase.SaveAsText's use of string.replace deprecated in Python 3?

Hi PsychoPy Devs,

I’ve been doing some at-home psychophysical monitor calibration using the demo files you have provided. While doing so I noticed that the staircase.SaveAsText function is throwing an error when calling “string.replace()”.

module 'string' has no attribute 'replace'

I think this has been replaced with “str.replace()”. No need to import String, I guess. Thought you might want to know!

Stay safe,

Martin

Thanks for pointing that out. It’s fixed in the repo now: https://github.com/psychopy/psychopy/pull/2842/commits/3f1356fc6d685dfe5db5fc614caf28def561d56f