Iohub error - an operation was attempted on something that is not a socket

pred_struct_final.psyexp (127.0 KB)

Hi there,

I hope somebody with experience of using iohub to link up Psychopy with a Tobii eye-tracker can help with the following. I have attached my experiment. The experiment runs fine (on a Windows 7 Dell laptop) but we have been experiencing intermittent connectivity issues with the eye-tracker.

Essentially, the eye-tracker disconnects unexpectedly duuring the experiment, so no samples are collected. We perform several rounds of calibration (using tobii infant controller), and we often realise the eye-tracker has stopped sending any data (no eye image) when we get to the calibration routine, but when looking at the hdf5 outputs it is clear no samples were collected for several trials prior to us identifying the problem. Now, these issues may be entirely due to the eye-tracker (it’s fairly old), but I was hoping psychopy may throw some useful errors to help troubleshoot.

In the last run, I got the following error, which to me does suggest there may indeed be a connectivity issue (but I don’t know much about iohub).

Can somebody with more expertise confirm whether this is indeed the case? Or could something else have caused this error? Bizzarely, as far as I can tell from the hdf5 output, the eye-tracker did not actually disconnect during this run (samples were collected for the entire duration of the experiment). But could it be that there was an intermettent connectivity issue - so the eyetracker disconnected only for a short time? This would be very worrying indeed…

I hope the above makes sense, but let me know if you need more info.

Any thoughts would be greatly appreciated, this has been giving us lots of headaches and the RA’s are getting a bit frustrated with all the issues.

Thanks,

Chiara

Running: C:\Users\Eyetracker2\Documents\StructureEyes\StructureEyes_final\Task_pred_struct_final_lastrun.py

33.8627 INFO Loaded monitor calibration from [‘2022_01_24 11:57’]
pygame 1.9.6
Hello from the pygame community. Contribute - pygame wiki
pressed e at 0.14686349413750577 ms
21.5134 WARNING Monitor specification not found. Creating a temporary one…
pressed e at 500.1634141729028 ms
380.0642 WARNING Monitor specification not found. Creating a temporary one…
pressed e at 0.16626773822281393 ms
662.8515 WARNING Monitor specification not found. Creating a temporary one…
ioHub Server Process Completed With Code: 0
Traceback (most recent call last):
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\iohub\client_init_.py”, line 1144, in sendToHubServer
self.udp_client.sendTo(tx_data)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\iohub\net.py”, line 76, in sendTo
self.sock.sendto(packed_data, address)
OSError: [WinError 10038] An operation was attempted on something that is not a socket
Traceback (most recent call last):
File “C:\Users\Eyetracker2\Documents\StructureEyes\StructureEyes_final\Task_pred_struct_final_lastrun.py”, line 3083, in
eye_tracker.setConnectionState(False)
File "C:\Program Files\PsychoPy3\lib\site-packages\psychopy\iohub\client_init
.py", line 62, in call
self.method_name, args, kwargs))
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\iohub\client_init_.py”, line 1149, in sendToHubServer
raise e
File "C:\Program Files\PsychoPy3\lib\site-packages\psychopy\iohub\client_init
.py", line 1144, in _sendToHubServer
self.udp_client.sendTo(tx_data)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\iohub\net.py”, line 76, in sendTo
self.sock.sendto(packed_data, address)
OSError: [WinError 10038] An operation was attempted on something that is not a socket

Experiment ended.

I posted that same error a week ago, I copy my post here in case someone can make sense of what is happening.

I was cornering the error, and this one occurs specifically when PsychoPy executes the following line:

ini_message = ‘ETSYNC 100’
eye_tracker.sendMessage(ini_message)

So, it is something with the connection with the eyetracker also (I’m using an EyeLink 1000 - version 2008).

Best,

Juan