Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

sockets (failure to bind them in PyGaze)

Hi,

I've succeeded in connecting my Windows 7 stimulus computer and Windows XP SMI eyetracker, but when I run PyGaze Init in OpenSesame, I get this error:

Exception: Error in libsmi.SMItracker.init: establishing connection failed; BIND_SOCKET: failed to bind sockets

Someone else had a similar question 3 years ago, when PyGaze support for SMI was experimental, but there wasn't really a solution then. And now there's no one at SMI to contact. Has anyone come up with a remedy since?

Thanks,

Russell

Comments

  • Hi Russell,

    What are the IP address and send/receive ports that you're using?

    Specifically: Are you running the experiment on the same computer that is running iViewX, or are you running it on a different computer that is connected via an ethernet cable?

    Cheers,

    Edwin

  • Hi Edwin,

    OMG, I don't know how I missed your response more than a month ago. Thank you so much for responding. Here is some more information:

    I'm using the 2-PC setup. My stimulus computer has the IP address 192.168.0.1 and Port 5555. The SMI Workstation has IP address 192.168.0.2 and Port 4444. They're connected with an ethernet cable. Also, in pygaze_init, "SMI send-port number" is 4444 and "receive-port number" is 5555. By the way, since I wrote I've upgraded the stimulus computer to a brand-new Alienware gaming laptop my dissertation advisor had.

    I have been trying to run the OpenSesame eyetracking template. I'm attaching the error log. The stimulus computer does seem to be communicating with the SMI Workstation because the Workstation's System Log/User tab reports "Grab started/Grab stopped" every time I run the OS template.

    Earlier, I tried to run the VS C# demo in the SDK and got the error "iV_connect: failed to establish connection." Also, even though I had checked off Stream Data under SetUp/Hardware/Communication on the SMI Workstation, the System Log/User tab reported that Data Streaming, Eye Video Streaming and Scene Video Streaming had all been disabled--then when I went back to look, the Stream Data box was unchecked! Again, the stimulus computer was definitely talking to the workstation, because the System tab reported a whole series of "Remote command executed" statements, including ET_EIM, ET_ESV, ET_EST and ET_EFX -- none of which I can find in the manual! (These statements were not reported for the OpenSesame eyetracking template runs.)

    So the 2 computers do seem to be connected, but I still get this "failure to bind socket" error.

    I hope something in the above clarifies the situation.

    Thank you again for your help & attention. It all sounds so easy in the SMI manual!

    best,

    Russell




  • edited July 2019

    Hi Russell,

    By default, the SMI implementation assumes iViewX is running on the same computer. You'd need to change the following line linked below (line 208 in pygaze/_eyetracker/libsmi.py) to the following:

    res = iViewXAPI.iV_Connect(c_char_p("192.168.0.2"), c_int(4444), c_char_p("192.168.0.1"), c_int(5555))
    


    https://github.com/esdalmaijer/PyGaze/blob/master/pygaze/_eyetracker/libsmi.py#L208

    Sorry for the hacky solution!

  • Hi Edwin,

    Thanks--hacky or not, this helped a little. I also changed the IP address in the definition of _init_ from the default to the actual address of the SMI workstation. Now I don't get the "bind socket" error. Instead I get the error "failed to establish connection." This is with OS 3.2.8. 

    However...when I went back to 3.2.7, the connection _was_ made. Only in this case, the eyetracking template experiment ran never got through the practice loop.

    First, there was no instructions sketchpad, just a grey screen with a black dot. The dot didn't move, but there seems to have been a calibration because the iViewX workstation reported "Calibration finished successfully."

    After a while, I hit the space bar, and then it took about 30 seconds, but the cursor began to move, first with about 15 seconds between moves, then at normal speed. The iView X workstation recorded a series of Deviations at that time.

    When that sequence stopped, the screen didn't change. I hit the space bar again and the grey screen disappeared, to be replaced by a smaller black screen with a white dot, a whole other calibration setup! This ran for a few seconds then crashed in "calibrate," libsmi.py line 338, as follows:

    XRMS = (sum(Xvar) / len(Xvar))**0.5

    Zero Division Error: integer division or modulo by zero

    Perhaps since I seem to have gotten past the connection problem by using 3.2.7, I should start a new string. I hope it's ok that I include this here, since it seems like a slow, step by step progress toward being able to run my study. And if I can, I'd like to be using the up-to-date version of OS, with all the built-ins doing their job!

    Thanks for your patience,

    Russell

  • Heya!

    That error stems from not getting in any samples during a noise calibration, and thus having Xvar be 0. I should add a check to the code to see if any have come in, and if not to not divide by a len of 0.

    You can monkey-patch this in your own package quickly by changing that line to:

    if len(Xvar) > 1:
        XRMS = (sum(Xvar) / len(Xvar))**0.5
    else:
        XRMS = 0
    

    You'd have to do the same for YRMS.

    Cheers,

    Edwin

Sign In or Register to comment.

agen judi bola , sportbook, casino, togel, number game, singapore, tangkas, basket, slot, poker, dominoqq, agen bola. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 50.000 ,- bonus cashback hingga 10% , diskon togel hingga 66% bisa bermain di android dan IOS kapanpun dan dimana pun. poker , bandarq , aduq, domino qq , dominobet. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 10.000 ,- bonus turnover 0.5% dan bonus referral 20%. Bonus - bonus yang dihadirkan bisa terbilang cukup tinggi dan memuaskan, anda hanya perlu memasang pada situs yang memberikan bursa pasaran terbaik yaitu http://45.77.173.118/ Bola168. Situs penyedia segala jenis permainan poker online kini semakin banyak ditemukan di Internet, salah satunya TahunQQ merupakan situs Agen Judi Domino66 Dan BandarQ Terpercaya yang mampu memberikan banyak provit bagi bettornya. Permainan Yang Di Sediakan Dewi365 Juga sangat banyak Dan menarik dan Peluang untuk memenangkan Taruhan Judi online ini juga sangat mudah . Mainkan Segera Taruhan Sportbook anda bersama Agen Judi Bola Bersama Dewi365 Kemenangan Anda Berapa pun akan Terbayarkan. Tersedia 9 macam permainan seru yang bisa kamu mainkan hanya di dalam 1 ID saja. Permainan seru yang tersedia seperti Poker, Domino QQ Dan juga BandarQ Online. Semuanya tersedia lengkap hanya di ABGQQ. Situs ABGQQ sangat mudah dimenangkan, kamu juga akan mendapatkan mega bonus dan setiap pemain berhak mendapatkan cashback mingguan. ABGQQ juga telah diakui sebagai Bandar Domino Online yang menjamin sistem FAIR PLAY disetiap permainan yang bisa dimainkan dengan deposit minimal hanya Rp.25.000. DEWI365 adalah Bandar Judi Bola Terpercaya & resmi dan terpercaya di indonesia. Situs judi bola ini menyediakan fasilitas bagi anda untuk dapat bermain memainkan permainan judi bola. Didalam situs ini memiliki berbagai permainan taruhan bola terlengkap seperti Sbobet, yang membuat DEWI365 menjadi situs judi bola terbaik dan terpercaya di Indonesia. Tentunya sebagai situs yang bertugas sebagai Bandar Poker Online pastinya akan berusaha untuk menjaga semua informasi dan keamanan yang terdapat di POKERQQ13. Kotakqq adalah situs Judi Poker Online Terpercayayang menyediakan 9 jenis permainan sakong online, dominoqq, domino99, bandarq, bandar ceme, aduq, poker online, bandar poker, balak66, perang baccarat, dan capsa susun. Dengan minimal deposit withdraw 15.000 Anda sudah bisa memainkan semua permaina pkv games di situs kami. Jackpot besar,Win rate tinggi, Fair play, PKV Games