An experiment that used to run without error in a 2020 version* now crashes, after updating to v2021.1.0. Data collection has not been started yet, as the experiment is still under work.
*: Sadly I no longer know the exact previous version.
This happens at the end of a routine that displays some text and some progress dots appearing progressively on the screen (updated at every frame, as per a variable built inside of a code component).
The traceback states:
File "d:\Experiments\hSs_behav_lastrun.py", line 738, in <module> with contextlib.closing(wave.open(file,'r')) as f: File "C:\Program Files\PsychoPy3\lib\wave.py", line 499, in open return Wave_read(f) File "C:\Program Files\PsychoPy3\lib\wave.py", line 163, in __init__ self.initfp(f) File "C:\Program Files\PsychoPy3\lib\wave.py", line 128, in initfp self._file = Chunk(file, bigendian = 0) File "C:\Program Files\PsychoPy3\lib\chunk.py", line 61, in __init__ self.chunkname = file.read(4) AttributeError: 'NoneType' object has no attribute 'read'
At line 738, the following chunk of code starts (all within the thisPractice loop):
with contextlib.closing(wave.open(file,'r')) as f: frames = f.getnframes() rate = f.getframerate() WAVduration = frames / float(rate) # keep track of which components have finished choiceComponents = [cross, notes, phrase, rating_text, choiceRating, punctele_2, brackets_2] for thisComponent in choiceComponents: thisComponent.tStart = None thisComponent.tStop = None thisComponent.tStartRefresh = None thisComponent.tStopRefresh = None if hasattr(thisComponent, 'status'): thisComponent.status = NOT_STARTED # reset timers t = 0 _timeToFirstFrame = win.getFutureFlipTime(clock="now") choiceClock.reset(-_timeToFirstFrame) # t0 is time of first possible flip frameN = -1
I can upload the entire experiment if needed for debugging. Thanks in advance!
OS (e.g. Win10): Win10
PsychoPy version (e.g. 1.84.x): 2021.1.0
Standard Standalone? (y/n) y