ECIfailure in Psychopy using pynetstation to send triggers to the EGI

OS (e.g. Win10): win10

PsychoPy version (e.g. 1.84.x): latest 2023.2.3

**Standard Standalone? (y/n) If not then what?: standard standalone

**What are you trying to achieve?:

Hi, everyone. Recently I’ve trying to use EGI with psychopy to conduct my EEG experiment. However, it is strange it returns errors after several successful experiment. Now, it’s ok for the psychopy to initiate the experiment and run several lines of codes provided by the egi netstation introduction “sending triggers via EGI Netstation”.

BUT, the psychopy would crash when asked to send a trigger to the EGI.

I also tried the Stroop demo from the forum ( many thanks to them!!) , but the same error showed:

Notably:

The computer can successfully connect to the egi station (in cmd, ping 10.10.10.42 returns successful connection)

The port 55513 is ready for receiving the trigger especially when considering the net station received and showed a event trigger from the psychopy. But the ip address is UNKNOWN, and I don’t know whether it would be the problem.

So, what can i do to solve this problem?

Any suggestion is welcome!

Hello,

It looks like Net Station is receiving the tags/events in the last image you uploaded. The crash could be caused by Net Station recording not being stopped from a previous experiment.

What version of EGI amplifier do you have? Is it a 300 or a 400 series?

Thanks for your reply!

It is a 400 series.

and this happened even I restarted the net station.

I thought the reason might not be the failure to stop from a previous experiment?

I’m a little confused, let me see if these get at more of the root of the issue:

  1. You can run several experiments where psychopy correctly sends information to Net Station?

  2. On examples where PsychoPy crashes, does the ECI connect to Net Station and start recording?

  3. What version of MacOS are you running?

  4. Can you upload your experiment?

Thanks for you kink reply!

  1. yes, i can run other experiments on that computer

  2. yes, the EGI started recording and my trigger showed in the event list

  3. OS X EI Capitan version 10.11.6

  4. I just tried the EGI stroop demo from the forum and encountered the same mistake.

stroopEGI-main.zip (16.3 KB)

The error is usually seen when the Mac doesn’t respond to the stimulus event being sent.

That’s a pretty old version of macOS that I can’t test the code against.

What version of net station are you running?

Do you have a photo of your system setup?

Can you update your net station computer’s operating system to 10.14.x?

Each time you get a crash I’d suggest restarting net station just to verify that you get a clean acquisition.

I think we’ve isolated where your crash is coming from… Essentially if you sent an event with START=0 and the value was less than 0, it would error out.

I’ve pushed a change to GitHub (GitHub - nimh-sfim/egi-pynetstation: Python package to enable the use of a Python-based API for EGI's NetStation EEG amplifier interface.), but if you wait till tomorrow there will be a new version on PyPi and you can use the built in PsychoPy package manager to update to 1.0.1.

Many thanks for your warm help and suggestions!!

So, I neet to download a new version of pynetstation and install it in a python environment, like using pip install pynetstation in the coder view?

There’s a plugin manager in psychopy where you should be able to load it. Or you can download the code from GitHub and replace the existing install in your package.

OK, I will have a try! Thanks for your suggestion.