I have created a minimal example for this crash:
from __future__ import division # so that 1/3=0.333 instead of 1/3=0
from psychopy import prefs, sound
import psychopy.data # This line causes PYO to crash
prefs.general['audioLib'] = ['pyo']
pyo version 0.8.5 (uses single precision)
portaudio error in Pa_StartStream (pa_start): Invalid stream pointer
Error starting server.
Can anyone see anything wrong in how I am importing these libraries?
I have tracked the problem down to the following two lines in psychopy/data/_init.py:
from .base import DataHandler
from .experiment import ExperimentHandler
If I comment out these lines, PYO does not crash.
I am struggling to see any connection between DataHandler, ExperimentHandler and psychopy/sound. Can anyone advise me on the appropriate next steps to track down the problem?