Psychopy EGI interaction not working

Hello everybody,

I’m trying to connect the computer that will run the Psychopy experiment with an EGI computer that runs Net Station Acquisition. Right now I am trying to connect both computer using a Ethernet cable (with a switch in between). The setup is the following:

I’ve installed the egi package using the following link: egi (pynetstation) — PsychoPy v2021.2

And I am currently trying the following tests:

But when I run this code I get the following error message:

(translated: Timeouterror: a connection attempt has failed because the connected party has not answered correcly after a certain time, or the connection mase failed because the connected host has not answered)

Does anybody have any experience with this? Do I need to change some settings on one or both computers with regard to ethernet connection before this can work? I think the psychopy computer (windows) finds the EGI computer, as can be seen in the following image, but I’m not sure about this:

image

Thanks in advance!

It should be noted that I am trying to run this with python 3. I’ve found the following post: Pynetstation (egi) with python 3

which said it does not work with python 3 yet. I’ve changed some lines of code in the files until I got no errors anymore regarding import errors and so on. I’ll try to install python 2 and see if this works.

Have you managed to make it work? I’m trying the same setup at the moment. I’ve found a pynetstation repository that works with python 3: GitHub - gstothart/EGI-Psychopy-Python3: EGI Psychopy library - Python 3 compatibility update

I’ve replaced the “egi” folder in my psychopy distribution with the one you can download from the link. Then my python 3 script runs. I connected the computer running psychopy (windows) and the EGI computer (mac) both to the Netgear router with an ethernet cable. Netstation aquisition is running on the mac computer, it is connected to the amplifier (NetAmps 400).

However, when I want to connect the windows computer by running the psychopy script, it returns:

File “…/EGITrigger\EGI.py”, line 31, in
ns.connect(‘10.10.10.43’, 55513) # Sample address and port – change according to your network settings
File “C:\Program Files\PsychoPy3\lib\site-packages\egi\simple.py”, line 727, in connect
self._socket.connect( str_address, port_no )
File “C:\Program Files\PsychoPy3\lib\site-packages\egi\socket_wrapper.py”, line 32, in connect
self._socket.connect( ( str_address, port_no ) )
ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it

I’ve tried changing the IP address from the windows computer from 10.10.10.42 to 10.10.10.43, both in the ethernet setting and in the script (as stated somewhere else) but that did not help. I’m lost.

Dear @SvennoNito ,

Yes I have managed to get things working in the meantime. It was a lot of thinkering however (with placing maps in specific locations and such). I think it might be easiest if we have a zoom call or something to set everything up. I need to warn you beforehand that the timing of the triggers is not optimal. If you want to do ERP studies, I would suggest you use psychtoolbox instead since they have superior trigger timing. I’ve heard this from the people of MagStim.

Dear @gvh ,

that’s great to hear!! I will text you a private message then to organize a zoom call.

Hi @gvh and @SvennoNito,

I’m also having this same issue with my PsychoPy not being able to connect to NetStation. Would love to hear more about what one or both of you did to troubleshoot/fix it. Happy to also organize a zoom if that would be more convenient.

Edit: Note also that my setup was previously working, but the stimulus computer died and had to be replaced, and this problem emerged after moving my previously working task over to the new machine and reinstalling PsychoPy.