Could/should sense/try audio support before going into the loop · Issue #152 · ReproNim/reprostim · GitHub
More Web Proxy on the site http://driver.im/
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
here is the chain of scripts, so using container with 0.7.9 version. But then when I start it, it waits for the first event (keypress 5 corresponding to trigger pulse) and exits right away
oot@reproiner:~# /home/reprostim/proj/repronim/ses-20250508-auto/run-repronim-reprostim-xorg
X.Org X Server 1.21.1.7
X Protocol Version 11, Revision 0
Current Operating System: Linux reproiner 6.1.0-22-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.94-1 (2024-06-21) x86_64
Kernel command line: BOOT_IMAGE=/@rootfs/boot/vmlinuz-6.1.0-22-amd64 root=UUID=8662213a-04e8-4dfa-a165-9527133a176b ro rootflags=subvol=@rootfs quiet
xorg-server 2:21.1.7-3+deb12u7 (https://www.debian.org/support)
Current version of pixman: 0.42.2
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Thu May 8 14:51:25 2025
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
reprostim timesync-stimuli
2025-05-08 14:51:27,888 [INFO] reprostim timesync-stimuli script started
2025-05-08 14:51:27,889 [INFO] main script started
pygame 2.6.1 (SDL 2.28.4, Python 3.10.16)
Hello from the pygame community. https://www.pygame.org/contribute.html
Window activated
Waiting for an event...
Series [0] started
Expression 'paInvalidSampleRate' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2048
Expression 'PaAlsaStreamComponent_InitialConfigure( &self->playback, outParams, self->primeBuffers, hwParamsPlayback, &realSr )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2721
Expression 'PaAlsaStream_Configure( stream, inputParameters, outputParameters, sampleRate, framesPerBuffer, &inputLatency, &outputLatency, &hostBufferSizeMode )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2842
Traceback (most recent call last):
File "/opt/psychopy/psychopy_2024.2.5_py3.10/bin/reprostim", line 8, in <module>
sys.exit(main())
File "/opt/psychopy/psychopy_2024.2.5_py3.10/lib/python3.10/site-packages/click/core.py", line 1161, in __call__
return self.main(*args, **kwargs)
File "/opt/psychopy/psychopy_2024.2.5_py3.10/lib/python3.10/site-packages/click/core.py", line 1082, in main
rv = self.invoke(ctx)
File "/opt/psychopy/psychopy_2024.2.5_py3.10/lib/python3.10/site-packages/click/core.py", line 1697, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/opt/psychopy/psychopy_2024.2.5_py3.10/lib/python3.10/site-packages/click/core.py", line 1443, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/opt/psychopy/psychopy_2024.2.5_py3.10/lib/python3.10/site-packages/click/core.py", line 788, in invoke
return __callback(*args, **kwargs)
File "/opt/psychopy/psychopy_2024.2.5_py3.10/lib/python3.10/site-packages/click/decorators.py", line 33, in new_func
return f(get_current_context(), *args, **kwargs)
File "/opt/psychopy/psychopy_2024.2.5_py3.10/lib/python3.10/site-packages/reprostim/cli/cmd_timesync_stimuli.py", line 160, in timesync_stimuli
res = do_main(
File "/opt/psychopy/psychopy_2024.2.5_py3.10/lib/python3.10/site-packages/reprostim/qr/timesync_stimuli.py", line 434, in do_main
play_audio(audio_file, async_=True)
File "/opt/psychopy/psychopy_2024.2.5_py3.10/lib/python3.10/site-packages/reprostim/audio/audiocodes.py", line 596, in play_audio
_play_audio_psychopy(name, duration, volume, sample_rate, async_)
File "/opt/psychopy/psychopy_2024.2.5_py3.10/lib/python3.10/site-packages/reprostim/audio/audiocodes.py", line 551, in _play_audio_psychopy
snd = sound.Sound(name, stereo=True, sampleRate=sample_rate, volume=volume)
File "/opt/psychopy/psychopy_2024.2.5_py3.10/lib/python3.10/site-packages/psychopy_sounddevice/backend_sounddevice.py", line 328, in __init__
self.setSound(value, secs=self.secs, octave=self.octave,
File "/opt/psychopy/psychopy_2024.2.5_py3.10/lib/python3.10/site-packages/psychopy_sounddevice/backend_sounddevice.py", line 382, in setSound
label, s = streams.getStream(sampleRate=self.sampleRate,
File "/opt/psychopy/psychopy_2024.2.5_py3.10/lib/python3.10/site-packages/psychopy_sounddevice/backend_sounddevice.py", line 97, in getStream
return self._getStream(sampleRate,
File "/opt/psychopy/psychopy_2024.2.5_py3.10/lib/python3.10/site-packages/psychopy_sounddevice/backend_sounddevice.py", line 142, in _getStream
self[label] = _SoundStream(sampleRate, channels, blockSize,
File "/opt/psychopy/psychopy_2024.2.5_py3.10/lib/python3.10/site-packages/psychopy_sounddevice/backend_sounddevice.py", line 169, in __init__
self._sdStream = sd.OutputStream(samplerate=self.sampleRate,
File "/opt/psychopy/psychopy_2024.2.5_py3.10/lib/python3.10/site-packages/sounddevice.py", line 1515, in __init__
_StreamBase.__init__(self, kind='output', wrap_callback='array',
File "/opt/psychopy/psychopy_2024.2.5_py3.10/lib/python3.10/site-packages/sounddevice.py", line 909, in __init__
_check(_lib.Pa_OpenStream(self._ptr, iparameters, oparameters,
File "/opt/psychopy/psychopy_2024.2.5_py3.10/lib/python3.10/site-packages/sounddevice.py", line 2796, in _check
raise PortAudioError(errormsg, err)
sounddevice.PortAudioError: Error opening OutputStream: Invalid sample rate [PaErrorCode -9997]
1.0832 DEBUG Opening message catalog /opt/psychopy/psychopy_2024.2.5_py3.10/lib/python3.10/site-packages/psychopy/localization/../app/locale/en_US/LC_MESSAGE/messages.mo for locale en_US
1.0835 DEBUG Locale for 'en_US' not found. Using default.
4.6948 INFO Trying to load audio library: sounddevice
4.6971 INFO Loaded SoundDevice with PortAudio V19.6.0-devel, revision 396fe4b6699ae929d3a685b3ef8a7e97396139a4
4.6973 INFO sound is using audioLib: sounddevice
4.6973 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).
4.6983 WARNING Monitor specification not found. Creating a temporary one...
4.7037 WARNING Requested an unavailable screen number - using first available.
4.7900 WARNING User requested fullscreen with size [1920 1080], but screen is actually [1280, 800]. Using actual size
5.1689 DEBUG TextBox2 loaded 1 chars with 0 blanks and 1 valid
5.1702 DEBUG TextBox2 loaded 1 chars with 0 blanks and 1 valid
5.1718 DEBUG TextBox2 loaded 1 chars with 0 blanks and 1 valid
5.1737 DEBUG TextBox2 loaded 1 chars with 0 blanks and 1 valid
5.1755 DEBUG TextBox2 loaded 1 chars with 0 blanks and 1 valid
5.1763 DEBUG TextBox2 loaded 1 chars with 0 blanks and 1 valid
5.1775 DEBUG TextBox2 loaded 1 chars with 0 blanks and 1 valid
5.1794 DEBUG TextBox2 loaded 1 chars with 0 blanks and 1 valid
5.1797 DEBUG TextBox2 loaded 1 chars with 0 blanks and 1 valid
5.1801 DEBUG TextBox2 loaded 1 chars with 0 blanks and 1 valid
5.1814 DEBUG TextBox2 loaded 1 chars with 0 blanks and 1 valid
5.1825 DEBUG TextBox2 loaded 1 chars with 0 blanks and 1 valid
5.1836 DEBUG TextBox2 loaded 1 chars with 0 blanks and 1 valid
5.1850 DEBUG TextBox2 loaded 1 chars with 0 blanks and 1 valid
5.1862 DEBUG TextBox2 loaded 1 chars with 0 blanks and 1 valid
5.1877 DEBUG TextBox2 loaded 1 chars with 0 blanks and 1 valid
5.1891 DEBUG TextBox2 loaded 1 chars with 0 blanks and 1 valid
5.1896 DEBUG TextBox2 loaded 1 chars with 0 blanks and 1 valid
5.1903 DEBUG TextBox2 loaded 1 chars with 0 blanks and 1 valid
5.1921 DEBUG TextBox2 loaded 1 chars with 0 blanks and 1 valid
5.1926 DEBUG TextBox2 loaded 1 chars with 0 blanks and 1 valid
5.1949 DEBUG Uploading Texture Font fontname to graphics card
5.2019 DEBUG Upload of Texture Font fontname complete
5.2118 DEBUG TextBox2 loaded 1 chars with 0 blanks and 1 valid
5.2140 DEBUG TextBox2 loaded 1 chars with 0 blanks and 1 valid
5.2158 DEBUG TextBox2 loaded 1 chars with 0 blanks and 1 valid
5.2163 DEBUG Uploading Texture Font fontname to graphics card
5.2176 DEBUG Upload of Texture Font fontname complete
5.5780 EXP Created timesync-stimuli = Window(allowGUI=True, allowStencil=False, autoLog=True, backendConf=UNKNOWN, backgroundFit=<method-wrapper '__getattribute__' of attributeSetter object at 0x7fb9a094b100>, backgroundImage=<method-wrapper '__getattribute__' of attributeSetter object at 0x7fb9a094b0a0>, bitsMode=UNKNOWN, blendMode='avg', bpc=(8, 8, 8), color=array([0, 0, 0]), colorSpace='rgb', depthBits=8, fullscr=True, gamma=None, gammaErrorPolicy='raise', infoMsg=UNKNOWN, lms=UNKNOWN, monitor=<psychopy.monitors.calibTools.Monitor object at 0x7fb9bead8be0>, multiSample=False, name='timesync-stimuli', numSamples=2, pos=[0.0, 0.0], screen=1, size=array([1280, 800]), stencilBits=0, stereo=False, title='ReproStim timesync-stimuli v0.7.9', units='norm', useFBO=False, useRetina=False, viewOri=0.0, viewPos=None, viewScale=None, waitBlanking=True, winType='pyglet')
5.5781 EXP timesync-stimuli: backgroundImage = None
5.5781 EXP timesync-stimuli: backgroundFit = 'cover'
5.7020 EXP Created unnamed TextStim = TextStim(__class__=<class 'psychopy.visual.text.TextStim'>, alignHoriz=method-wrapper(...), alignText='center', alignVert=method-wrapper(...), anchorHoriz='center', anchorVert='center', antialias=True, autoDraw=False, autoLog=True, bold=False, color=array([1., 1., 1.]), colorSpace='rgb', contrast=1.0, depth=0, draggable=False, flipHoriz=False, flipVert=False, font='', fontFiles=[], height=0.1, italic=False, languageStyle='LTR', name='unnamed TextStim', opacity=1.0, ori=0.0, pos=array([0., 0.]), rgb=UNKNOWN, text=str(...), units='norm', win=Window(...), wrapWidth=1)
5.7068 EXP Created unnamed TextStim = TextStim(__class__=<class 'psychopy.visual.text.TextStim'>, alignHoriz=method-wrapper(...), alignText='center', alignVert=method-wrapper(...), anchorHoriz='center', anchorVert='center', antialias=True, autoDraw=False, autoLog=True, bold=False, color=array([1., 1., 1.]), colorSpace='rgb', contrast=1.0, depth=0, draggable=False, flipHoriz=False, flipVert=False, font='', fontFiles=[], height=0.1, italic=False, languageStyle='LTR', name='unnamed TextStim', opacity=1.0, ori=0.0, pos=array([0., 0.]), rgb=UNKNOWN, text='+', units='norm', win=Window(...), wrapWidth=1)
5.7089 EXP Created unnamed TextStim = TextStim(__class__=<class 'psychopy.visual.text.TextStim'>, alignHoriz=method-wrapper(...), alignText='center', alignVert=method-wrapper(...), anchorHoriz='center', anchorVert='center', antialias=True, autoDraw=False, autoLog=True, bold=False, color=array([1., 1., 1.]), colorSpace='rgb', contrast=1.0, depth=0, draggable=False, flipHoriz=False, flipVert=False, font='', fontFiles=[], height=0.05, italic=False, languageStyle='LTR', name='unnamed TextStim', opacity=1.0, ori=0.0, pos=array([ 0. , -0.7]), rgb=UNKNOWN, text='', units='norm', win=Window(...), wrapWidth=1)
5.9513 DATA No keypress (maxWait exceeded)
6.1514 DATA No keypress (maxWait exceeded)
6.3514 DATA No keypress (maxWait exceeded)
6.5515 DATA No keypress (maxWait exceeded)
6.7516 DATA No keypress (maxWait exceeded)
6.9516 DATA No keypress (maxWait exceeded)
7.1517 DATA No keypress (maxWait exceeded)
7.3518 DATA No keypress (maxWait exceeded)
7.5519 DATA No keypress (maxWait exceeded)
7.7519 DATA No keypress (maxWait exceeded)
7.9520 DATA No keypress (maxWait exceeded)
8.1521 DATA No keypress (maxWait exceeded)
8.3521 DATA No keypress (maxWait exceeded)
8.5522 DATA No keypress (maxWait exceeded)
8.7310 DATA Keypress: 5
First, since I saw only the last lines, I thought it is something about logic on keyrpresses since I did not even see that error above on audio. So I think we should sense audio first.
The text was updated successfully, but these errors were encountered:
I was trying to automate its operation to be ran on reproiner
here is the chain of scripts, so using container with 0.7.9 version. But then when I start it, it waits for the first event (keypress 5 corresponding to trigger pulse) and exits right away
First, since I saw only the last lines, I thought it is something about logic on keyrpresses since I did not even see that error above on audio. So I think we should sense audio first.
The text was updated successfully, but these errors were encountered: