OSError: sndfile library not found

If this template helps then use it. If not then just delete and start from scratch.

OS (e.g. Win10): MacOSSierra 10.12.6
PsychoPy version (e.g. 1.84.x): Psychopy v3.0.0b7
Standard Standalone? (y/n) If not then what?: Yes
What are you trying to achieve?:
present 2 stimuli and 4 choice answers (clickable by mouse)

What did you try to make it work?:


What specifically went wrong when you tried that?:

I got this error message

########### Running: /Users/lpxslma/Desktop/foodGame/game_lastrun.py ###########
Traceback (most recent call last):
File “soundfile.pyc”, line 142, in
OSError: sndfile library not found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/Users/lpxslma/Desktop/foodGame/game_lastrun.py”, line 14, in
from psychopy import locale_setup, sound, gui, visual, core, data, event, logging, clock
File “/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/psychopy/sound/init.py”, line 79, in
from . import backend_sounddevice as backend
File “/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/psychopy/sound/backend_sounddevice.py”, line 20, in
import soundfile as sf
File “”, line 961, in _find_and_load
File “”, line 950, in _find_and_load_unlocked
File “”, line 646, in _load_unlocked
File “”, line 616, in _load_backward_compatible
File “soundfile.pyc”, line 163, in
OSError: cannot load library ‘/Applications/PsychoPy3.app/Contents/Resources/lib/_soundfile_data/libsndfile.dylib’: dlopen(/Applications/PsychoPy3.app/Contents/Resources/lib/_soundfile_data/libsndfile.dylib, 2): image not found

I’m not sure why there’s a sound library error when i did not use any sound component. Also, I’ve checked that all the images I want to use is saved in the folder.

I have this exact same issue on clean install of StandalonePsychoPy3-3.0.0b7-MacOS.dmg on OS 10.12.6. Demos without sound (e.g., hello_world, clockface) work fine, but soundStimuli.py does not.

hi jennifer, i redid my experiment on the 1.9 version and it loaded so it might be a bug in this latest version :confused:

I had the same problem with the stroop demo with a fresh install of StandalonePsychoPy3-3.0.0b7-MacOS on macOS HighSierra. Version b7 is the first version to work on my computer, so this is good. The thing with the stroop demo is that there shouldn’t be any sound, so I found that the default preferences were the problem. When I deleted all sound preferences, the (silent ) stroop demo now will work.


-R

thanks for letting me know! it works like a charm now :slight_smile:

Likewise! Thanks!