Closed danielemarinazzo closed 2 years ago
Thanks. Will look into this. I also looked into this unsystematically when tidying up the auditory experiments, and found different issues with PTB (additional installation requirements, and apparently worse sound quality). This is a different problem, but in any case we should review the PTB option properly, as psychopy does seem to have a major preference for it.
I have tried to run like in this code I add here. But it seems that this issue has been presented before.
(eeg-notebooks) andraderenew@Renes-MacBook-Air eeg-notebooks-master % eegnb runexp -ip Experiment to run: 1 run command line prompt script Welcome to NeurotechX EEG Notebooks
Please enter the integer value corresponding to your EEG device:
[ 0] None [ 1] Muse (2016) [ 2] Muse 2 [ 3] Muse S [ 4] OpenBCI Ganglion [ 5] OpenBCI Cyton [ 6] OpenBCI Cyton + Daisy [ 7] G.Tec Unicorn [ 8] BrainBit [ 9] Notion 1 [10] Notion 2 [11] Synthetic [12] FreeEEG32
Enter Board Selection: 2 Selected board: Muse 2
Please select which experiment you would like to run:
[0] Visual N170 [1] Visual P300 [2] Visual SSVEP [3] visual-cue (no description) [4] visual-codeprose (no description) [5] Auditory SSAEP (orig) [6] Auditory SSAEP (single freq) [7] Auditory oddball (orig) [8] Auditory oddball (diaconescu)
Enter Experiment Selection: 0 Selected experiment: visual-N170
Now, enter the duration of the recording (in seconds).
Enter duration: 20
Next, enter the ID# of the subject you are recording data from.
Enter subject ID#: 1
Next, enter the session number you are recording for.
Enter session #: 1
EEG device successfully connected!
Press [ENTER] when ready to begin...
Traceback (most recent call last):
File "/Users/andraderenew/opt/anaconda3/bin/eegnb", line 33, in
@andraderenew As said before in https://github.com/NeuroTechX/eeg-notebooks/issues/16#issuecomment-843180077, this issue was fixed in #101. Make sure you're using the latest commit.
I am using the latest commit. I deleted all I had previously and reinstalled from source.
If the problem still persists, try to run psychopy before eegnb. Once you are in psychopy go to preferences->audio->audio library and puy pygame or pyo on top (you should have these installed), and leave ptb and sounddevice somewhere lower in the queue.
see also https://github.com/NeuroTechX/eeg-notebooks/issues/66#issuecomment-759330579 and replies
@andraderenew I can see from the stack trace that you're not using the latest commit. You may have files from the old commit still around.
Specifically this:
File "/Users/andraderenew/eeg-notebooks/eegnb/cli/introprompt.py", line 132, in main
run_experiment(experiment, record_duration, eeg_device, save_fn)
This is the line that was wrong before and was fixed, and is indeed corrected in the latest commit.
thanks for checking, I'll use the last commit! I was pointing out a solution that worked for me when everything else did not, in case @andraderenew is actually using the last commit.
On Fri, 21 May 2021 at 10:01, Erik Bjäreholt @.***> wrote:
@danielemarinazzo https://github.com/danielemarinazzo I can see from the stack trace that you're not using the latest commit. You may have files from the old commit still around.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/NeuroTechX/eeg-notebooks/issues/68#issuecomment-845744950, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABIQU7RZFCSKJNMV4I7OAM3TOYHMFANCNFSM4U2VP6AQ .
@danielemarinazzo Sorry I tagged the wrong person, I meant to tag @andraderenew.
all solved!!! thanks for the comment on PTB and psychopy. I had to set preferences with python console because with the GUI it crashed.
So there's this warning
3.6146 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', 'PTB', 'pyo', 'pygame'] (in that order).
If I do as requested, I then get an error