Comments (10)
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.
from eeg-expy.
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
sys.exit(load_entry_point('eeg-notebooks', 'console_scripts', 'eegnb')())
File "/Users/andraderenew/opt/anaconda3/lib/python3.8/site-packages/click/core.py", line 829, in call
return self.main(*args, **kwargs)
File "/Users/andraderenew/opt/anaconda3/lib/python3.8/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/Users/andraderenew/opt/anaconda3/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/andraderenew/opt/anaconda3/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/andraderenew/opt/anaconda3/lib/python3.8/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/Users/andraderenew/eeg-notebooks/eegnb/cli/main.py", line 55, in runexp
run_introprompt()
File "/Users/andraderenew/eeg-notebooks/eegnb/cli/introprompt.py", line 132, in main
run_experiment(experiment, record_duration, eeg_device, save_fn)
File "/Users/andraderenew/eeg-notebooks/eegnb/cli/utils.py", line 38, in run_experiment
module.present(duration=record_duration, eeg=eeg_device, save_fn=save_fn) # type: ignore
File "/Users/andraderenew/eeg-notebooks/eegnb/experiments/visual_n170/n170.py", line 22, in present
record_duration = np.float32(duration)
TypeError: float() argument must be a string or a number, not 'EEG'
1.3636 WARNING PTB audio lib was requested but not loaded: psychtoolbox audio failed to import
1.4181 WARNING For experiments that use audio stimuli, timing will be much better if you upgrade your PsychoPy installation to a 64bit Python3 installation and use the PTB backend.
from eeg-expy.
@andraderenew As said before in #16 (comment), this issue was fixed in #101. Make sure you're using the latest commit.
from eeg-expy.
I am using the latest commit. I deleted all I had previously and reinstalled from source.
from eeg-expy.
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.
from eeg-expy.
see also #66 (comment) and replies
from eeg-expy.
@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.
from eeg-expy.
from eeg-expy.
@danielemarinazzo Sorry I tagged the wrong person, I meant to tag @andraderenew.
from eeg-expy.
all solved!!! thanks for the comment on PTB and psychopy. I had to set preferences with python console because with the GUI it crashed.
from eeg-expy.
Related Issues (20)
- Problems in data streaming using Brainflow using muse2 HOT 10
- Installing eeg notebooks on Mac M1 HOT 1
- Idea to implement for EEG decoding the option to convert it to DFT? HOT 1
- Hello, I have a basic question about another project HOT 1
- N170 experiment doesn't work HOT 1
- N170 Load and Visualize Data HOT 5
- Research showing the influence of the used SSVEP pattern image HOT 2
- Error with installing dukpy HOT 3
- Can't run experiments from CLI interface HOT 4
- pyglet version incompatibility mac HOT 4
- Implement version + release schedule HOT 2
- aux channel with muse2_bfn device
- P300 experiment explanation: "...high or low probability..."
- Legend items order when using diff_waveform in plot_conditions HOT 1
- Support for Oculus/Meta Quest VR for N170 and other experiments
- is it possible to save the PPG data from Muse 2 (with bluemuse and/or brainflow)? HOT 2
- Problems with saving data file using brainflow HOT 2
- AttributeError: module 'eegnb.experiments.visual_ssvep.ssvep' has no attribute 'present' HOT 3
- Incomplete outputfile SSAEP_onefreq with Bluemuse HOT 1
- `eeg-notebook` => `eeg-expy` rename
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eeg-expy.