OS (e.g. Win10): Win10 PsychoPy version (e.g. 1.84.x): Standard Standalone? (y/n) If not then what?: Standalone
Hello,
Thank you for reading this. When I try to run my experiment, the experimenter interface opens for a brief moment, then closes automatically, and shows the following error message:
1.2213 WARNING We strongly recommend you activate the PTB sound engine in PsychoPy prefs as the preferred audio engine. Its timing is vastly superior. Your prefs are currently set to use [‘sounddevice’] (in that order).
8.8049 WARNING Monitor specification not found. Creating a temporary one…
8.8067 WARNING Requested an unavailable screen number - using first available.
9.9635 WARNING Monitor specification not found. Creating a temporary one…
9.9635 WARNING Use of rgb arguments to stimuli are deprecated. Please use color and colorSpace args instead
followed by this at the bottom:
ValueError: Multiple output devices found for ‘Speakers (Realtek® Audio)’:
[3] Speakers (Realtek® Audio), MME
[7] Speakers (Realtek® Audio), Windows DirectSound
[8] Speakers (Realtek® Audio), Windows WASAPI
Experiment ended.
I have not adjusted any of the default preferences and reinstalling it / restarting my computer did not work either. What could be the issue for this and would there be any possible solutions? Thank you!
The lines about the monitor are not an error, just a warning. If you want to get rid of it, go into the builder’s monitor center and create an entry with the specifications of the monitor you’re using. But if the absolute size of your stimuli and gamma correction is not important for your experiment you can ignore the warning.
The error about audio output devices is generated be sounddevice, one of the several libraries you can use in psychopy to play sound. The recommended audio library is ptb. In the builder under preferences, you can add ‘ptb’ as your audio library. Does that solve your problem?
Otherwise you have to find a way to pick an output device for sounddevice. Others seem to have this problem as well - perhaps there is already a solution for this error on the forum. I’ll check later if your problem persists.
Thank you for your reply! Noted about the monitor warnings, I will ignore those from now on.
For the audio error, I did already set the audio library to ptb in the program’s preferences (I cannot find the preferences option in the builder interface), as shown below. This error was sudden and I had no problems with the software detecting my sound device automatically previously, which was a few days ago. This however does not solve the problem, and reinstalling Psychopy also seems to still keep whatever settings I have changed in the preferences prior to uninstalling it, instead of going back to the default after reinstallation.
Thank you for helping! I have also tried to search the forum for a solution, but to no avail.
I encountered the same problem/error message (and did not find a solution yet unfortunately).
In my case the file does play with headphones in, maybe this is also the case for you?
Thank you for the direction. The code showed the error “TypeError: getDevices() got an unexpected keyword argument ‘type’”. When I removed the type=‘output’, I got this:
Sorry, the correct argument was kind, not type. I edited it above.
Apparently you have several output devices under the DeviceName of ‘Speakers (Realtek® Audio)’. Are you on Windows? If you open your device manager, do the three devices show up separately? Could you disable two of them and check if that solves the problem?
I don’t think that your problem is related to that. These three options are not file formats but audio devices/APIs and you can pick one if you record with Audacity. But that shouldn’t make a difference for the file format of your recording.
You can open the device manager on windows by pressing Windows + R, typing in “devmgmt.msc” and pressing enter. Then you can expand the audio input and output section and check what’s listed there.
Another option: Do you have an ASIO driver installed? Does setting the driver to ‘ASIO’ make a difference?
I also do not have an ASIO driver installed. When I downloaded Psychopy on another laptop, there were no errors and I could get the experiment to run smoothly.
The device manager just shows you the one speakers device (not a separate one for MME, DirectSound or WASAPI). I’m not sure what else to suggest.
Does the value error have a traceback which you didn’t post? Perhaps I or someone else could look into the psychopy source code to the point where the error occurs?
In an earlier post you mentioned that you deleted your preference file. Could you replace the line specifying the audio device with this:
# audio device to use (if audioLib allows control)
audioDevice = default
(If it doesn’t have any effect, just reset the preferences.)
Traceback (most recent call last):
File “…”, line 91, in
name=‘sound_1’)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\sound\backend_sounddevice.py”, line 318, in init
hamming=self.hamming)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\sound\backend_sounddevice.py”, line 365, in setSound
blockSize=self.blockSize)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\sound\backend_sounddevice.py”, line 96, in getStream
blockSize=blockSize)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\sound\backend_sounddevice.py”, line 140, in _getStream
device=defaultOutput)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\sound\backend_sounddevice.py”, line 171, in init
callback=self.callback)
File “C:\Program Files\PsychoPy3\lib\site-packages\sounddevice.py”, line 1373, in init
**_remove_self(locals()))
File “C:\Program Files\PsychoPy3\lib\site-packages\sounddevice.py”, line 696, in init
extra_settings, samplerate)
File “C:\Program Files\PsychoPy3\lib\site-packages\sounddevice.py”, line 2488, in _get_stream_parameters
device = _get_device_id(device, kind, raise_on_error=True)
File “C:\Program Files\PsychoPy3\lib\site-packages\sounddevice.py”, line 2634, in _get_device_id
for id, name in matches))
ValueError: Multiple output devices found for ‘Altofalantes (Realtek(R) Audio)’:
[4] Altofalantes (Realtek(R) Audio), MME
[9] Altofalantes (Realtek(R) Audio), Windows DirectSound
[11] Altofalantes (Realtek(R) Audio), Windows WASAPI
It seems that going into %appdata%/psychopy3 and deleting both the appData.cfg and userPrefs.cfg files work for me. It seems to reset the preferences to the default. Hope it works for you as well!
I am facing the same issue as well. i am unable to get my sound files to play and it was fine just a few days ago too. I have attached the stdout script below
How do i delete both the appData.cfg and userPrefs.cfg?
Traceback (most recent call last):
File “C:\Users\kagtan\Desktop\PsychoPy Audio (recut files)_UPDATED 0311\ImplicitEK_Tone_First_English start with sound_lastrun.py”, line 105, in
name=‘sound_1’)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\sound\backend_sounddevice.py”, line 318, in init
hamming=self.hamming)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\sound\backend_sounddevice.py”, line 365, in setSound
blockSize=self.blockSize)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\sound\backend_sounddevice.py”, line 96, in getStream
blockSize=blockSize)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\sound\backend_sounddevice.py”, line 140, in _getStream
device=defaultOutput)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\sound\backend_sounddevice.py”, line 171, in init
callback=self.callback)
File “C:\Program Files\PsychoPy3\lib\site-packages\sounddevice.py”, line 1373, in init
**_remove_self(locals()))
File “C:\Program Files\PsychoPy3\lib\site-packages\sounddevice.py”, line 696, in init
extra_settings, samplerate)
File “C:\Program Files\PsychoPy3\lib\site-packages\sounddevice.py”, line 2488, in _get_stream_parameters
device = _get_device_id(device, kind, raise_on_error=True)
File “C:\Program Files\PsychoPy3\lib\site-packages\sounddevice.py”, line 2634, in _get_device_id
for id, name in matches))
ValueError: Multiple output devices found for ‘Speakers (Synaptics Audio)’:
[3] Speakers (Synaptics Audio), MME
[7] Speakers (Synaptics Audio), Windows DirectSound
[8] Speakers (Synaptics Audio), Windows WASAPI