Libraries error running experiment

Hi,
I am setting up a new task on the Builder and encountered the following error (see below). I tried on a different Mac (on which I usually run Psychopy) and I get the same error, but it seems to run ok on a Windows. Interestingly, it was running ok for a while until the error suddenly appeared. It does not seem to be related to any of the routines I added towards the end, as it persists even when I delete them all and simply keep a single routine with a text message. I’d very much appreciate any help to try solve this. My task includes playing a couple of sound files and at some point mic recording while playing audio, aside from text and fixation crosses.
Thank you very much!
Joan

OS (e.g. Win10): MacOS Mojave 10.14.5
PsychoPy version (e.g. 1.84.x): 3.2.4
Standard Standalone? (y/n) If not then what?: yes

Error Message:

2019-12-09 18:27:33.199 python[541:5305] ApplePersistenceIgnoreState: Existing state will not be touched. New state will be written to (null)
Traceback (most recent call last):
File “/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/psychopy/sound/backend_pyo.py”, line 19, in
import pyo
File “pyo/init.pyc”, line 28, in
File “pyo/lib/analysis.pyc”, line 32, in
File “pyo/lib/_core.pyc”, line 58, in
File “pyo/_pyo.pyc”, line 14, in
File “pyo/_pyo.pyc”, line 10, in __load
File “imp.pyc”, line 342, in load_dynamic
ImportError: dlopen(/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/lib-dynload/pyo/_pyo.so, 2): Library not loaded: @loader_path/libportaudio.2.dylib
Referenced from: /Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/lib-dynload/pyo/_pyo.so
Reason: image not found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/Users/max/Desktop/Reboot_experiment/Reboot_expe_lastrun.py”, line 18, in
from psychopy import sound, gui, visual, core, data, event, logging, clock, microphone
File “/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/psychopy/microphone.py”, line 45, in
from psychopy.sound import backend_pyo
File “/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/psychopy/sound/backend_pyo.py”, line 23, in
raise exceptions.DependencyError(repr(err))
psychopy.exceptions.DependencyError: ImportError(‘dlopen(/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/lib-dynload/pyo/_pyo.so, 2): Library not loaded: @loader_path/libportaudio.2.dylib\n Referenced from: /Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/lib-dynload/pyo/_pyo.so\n Reason: image not found’,)

I’m getting the same error here on an oldish MacBook Air running the latest standalone PsychoPy version under OSX 10.11.6. It occurs in an experiment I created this morning that has image stimuli (whether they use actual images, or the image name is set as None), but not in another experiment I created earlier in the week with shapes. There are no sound files in the experiment, nor is there any sound recording. The error message is as follows:

Traceback (most recent call last):
File “/Users/xxxxx/VS_lastrun.py”, line 18, in
from psychopy import sound, gui, visual, core, data, event, logging, clock, microphone
File “/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/psychopy/microphone.py”, line 45, in
from psychopy.sound import backend_pyo
File “/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/psychopy/sound/backend_pyo.py”, line 23, in
raise exceptions.DependencyError(repr(err))
psychopy.exceptions.DependencyError: ImportError(‘dlopen(/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/lib-dynload/pyo/_pyo.so, 2): Library not loaded: @loader_path/libportaudio.2.dylib\n Referenced from: /Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/lib-dynload/pyo/_pyo.so\n Reason: image not found’,)

Any suggestions would be appreciated.

[Edit: Bizarrely, after closing and relaunching PsychoPy, the error no longer occurred and the experiment is now working fine.]

+1
I get the same error, trying to replicate the shadowing task from the tutorial at https://phon.wordpress.ncsu.edu/lab-manual/perception-experiments/working_with_audio_shadowing_task/
It started to appear after I put in the microphone component, but now persists even when I remove that component.

MacOS 10.11.6
PsychoPy version 3.2.4

I’m having the same problem, found in several different posts:

Any suggestions when encountering the following:

ApplePersistenceIgnoreState: Existing state will not be touched. New state will be written to (null)

Experiment Ended

Note: Typing the below in the terminal didn’t work although it seemed to work for others. Eg. https://stackoverflow.com/questions/34515333/applepersistenceignorestate-error-started-just-after-wxpython-installation
https://stackoverflow.com/questions/18733965/annoying-message-when-opening-windows-from-python-on-os-x-10-8/22467012#22467012

defaults write org.python.python ApplePersistenceIgnoreState NO