Hello,
I recently upgraded to 1.84.0, though I had been using the beta versions for my experiment because I require microphone access and the newest versions were the only ones I could get to work. I have a few questions about how to make my experiment 1) work and 2) more less buggy.
First of all,
Out of the box, I tried to run my experiment and I received this:
pyo version 0.8.0 (uses single precision)
Traceback (most recent call last):
File "/Users/Dustin/Desktop/TRW_scan_comp/TRW_comp.py", line 69, in <module>
microphone.switchOn()
File "/Users/Dustin/.psychopy2/versions/psychopy/microphone.py", line 1023, in switchOn
sound.initPyo(rate=sampleRate) #will automatically use duplex=1 and stereo if poss
File "/Users/Dustin/.psychopy2/versions/psychopy/sound.py", line 642, in initPyo
core.wait(0.5)#wait for server to boot before starting te sound stream
File "/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/psychopy/clock.py", line 219, in wait
for winWeakRef in core.openWindows:
AttributeError: 'module' object has no attribute 'openWindows'`
I also encountered this error using the previous beta release. As a quick and dirty fix I made these changes to clock.py by referencing previous versions:
# removed lines 219-228
#for winWeakRef in core.openWindows:
# win = winWeakRef()
# if (win.winType == "pyglet" and
# hasattr(win.winHandle, "dispatch_events")):
# win.winHandle.dispatch_events() # pump events
# added:
try:
wins = pyglet.window.get_platform().get_default_display().get_windows()
for win in wins: win.dispatch_events()#pump events on pyglet windows
except:
pass #presumably not pyglet
I do not know the implications of this change, however, my experiment works for the most part.
This appears to happen when I turn the microphone on. I have adapted my code from the builder, but I haven’t changed much with regard to how the microphone and audio are handled (other than the filename of the saved wav file).
Any ideas why this is happening? I can’t recreate this in the previous stable release because i receive an immediate cannot find library pyo
error.
Also, 2 other questions about the new version:
- In the release notes it says:
On Mac the 0.8.0 release of pyo
audio lib, which is being packaged in this version of PsychoPy, is not closing properly with the ‘coreaudio’ backend so you might want to switch that to use ‘portaudio’ instead for now
So my question is how do I do this? I am using the coder view. Every time my experiment finishes, it doesn’t close properly. It saves all the necessary files but I still need to end the experiment manually.
- Every now and then I receive:
Fatal Python error: (pygame parachute) Segmentation Fault
What does this mean?
I have attached my code, though it is very similar to the default code output by the builder. Thanks for your help!
Dustin
TRW_comp.py (33.9 KB)