GithubHelp home page GithubHelp logo

Comments (10)

JohnGriffiths avatar JohnGriffiths commented on July 29, 2024

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.

andraderenew avatar andraderenew commented on July 29, 2024

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.

ErikBjare avatar ErikBjare commented on July 29, 2024

@andraderenew As said before in #16 (comment), this issue was fixed in #101. Make sure you're using the latest commit.

from eeg-expy.

andraderenew avatar andraderenew commented on July 29, 2024

I am using the latest commit. I deleted all I had previously and reinstalled from source.

from eeg-expy.

danielemarinazzo avatar danielemarinazzo commented on July 29, 2024

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.

danielemarinazzo avatar danielemarinazzo commented on July 29, 2024

see also #66 (comment) and replies

from eeg-expy.

ErikBjare avatar ErikBjare commented on July 29, 2024

@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.

danielemarinazzo avatar danielemarinazzo commented on July 29, 2024

from eeg-expy.

ErikBjare avatar ErikBjare commented on July 29, 2024

@danielemarinazzo Sorry I tagged the wrong person, I meant to tag @andraderenew.

from eeg-expy.

andraderenew avatar andraderenew commented on July 29, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.