Howdy, Stranger!

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

Supported by

Error with Tobii

edited February 2018 in OpenSesame

Hi, I am very new to both the Tobii and opensesame/pygaze, so hopefully I can provide enough information. I am using a Tobii t60 eyetracker. I have installed opensesame (windows installer one) on to my windows 10 machine and have manually replaced the current PyGaze package with the contents of the pygaze.zip (from here: http://www.pygaze.org/2017/09/pygaze-supports-tobii-pro-sdk/). When I attempt to run the pygaze template (with Tobii selected as the eyetracker) i get the following error:
File "C:\Program Files (x86)\OpenSesame\lib\site-packages\libqtopensesame\misc\process.py", line 150, in run exp.run() File "C:\Program Files (x86)\OpenSesame\lib\site-packages\libopensesame\experiment.py", line 411, in run self.items.execute(self.var.start) File "C:\Program Files (x86)\OpenSesame\lib\site-packages\libopensesame\item_store.py", line 91, in execute self.run(name) File "C:\Program Files (x86)\OpenSesame\lib\site-packages\libopensesame\item_store.py", line 106, in run self[name].run() File "C:\Program Files (x86)\OpenSesame\lib\site-packages\libopensesame\sequence.py", line 51, in run self.experiment.items.run(_item) File "C:\Program Files (x86)\OpenSesame\lib\site-packages\libopensesame\item_store.py", line 106, in run self[name].run() File "C:\Program Files (x86)\OpenSesame\share\opensesame_plugins\pygaze_init\pygaze_init.py", line 217, in run **kwdict) File "C:\Program Files (x86)\OpenSesame\lib\site-packages\pygaze\eyetracker.py", line 91, in __init__ from pygaze._eyetracker.libtobii import TobiiProTracker File "C:\Program Files (x86)\OpenSesame\lib\site-packages\pygaze\_eyetracker\libtobii.py", line 9, in <module> import tobii_research as tr File "C:\Program Files (x86)\OpenSesame\lib\site-packages\pygaze\_eyetracker\tobii_research.py", line 2, in <module> from tobiiresearch.interop import tobii_pro ImportError: No module named interop

Thank you for any help!

Comments

  • Hi Katie,

    Here's what I would do: Simply install OpenSesame 3.2.0, and then with the Python package manager in OpenSesame install tobiiresearch. That way you have the latest versions of everything.

    Let us know if that works for you!

    Cheers!
    Sebastiaan

    Buy Me A Coffee

  • Hi Sebastiaan,

    Thank you for such a quick response - i've reinstalled opensesame (3.2.0) however when I try to install tobii-research using the package manager in opensesame I get the error "Failed to install tobii-research"

    Thanks!
    Katie

  • In the debug window you will see a more informative error message. My first guess is that you're not running OpenSesame as administrator?

    Buy Me A Coffee

  • Brilliant - that worked. Thank you so much!

  • Thanks for this! - Can confirm that this works. It's strange that downloading "tobiiresearch" through pip, or even downloading the SDK thought the tobii site does not give you all the scripts necessary.

  • @sebastiaan I got a similar error message with @katiewalsh when I run the eye tracker template with Tobii as selected eye tracker (ModuleNotFoundError: No module named 'tobii_research'). I wanted to follow your suggestion but on OpenSesame 3.3.10 there is no Python package manager option under Menu → Tools → anymore.

    Is there an alternative way to install the Tobii package in OpenSesame? I tried pip install as suggested here but it produces these errors:

    Note that I started OpenSesame as an administrator and used the debug window. The OpenSesame installation was that from the standard windows installation.

    I appreciate your help in advance!

    Wisnu

  • Hi Wisnu,

    Try pip.main(["install", "tobii-research" ])

    Does that work?

    Eduard

    Buy Me A Coffee

  • @eduard no, unfortunately, I got the same error messages (could not find a version that satisfies the requirements; no matching distribution for X).

  • Hi Wisnu,

    after doing some googling, it seems that Tobii-research only supports Python up to version 3.5 (see here). So you could try 2 things:

    1) Install Opensesame with Python3.5 instead of 3.7. I don't think this is a good idea, as you basically take a gamble whether you break some other aspect of the software.

    2) Check whether you can install it when you follow the manual instructions, (and potentially fix version issues on the fly).

    3) Do more googling/annoy the tobii developers to release an update that works with Python. Maybe it is not even necessary to change much of the code, but just to repackage the code

    Good luck,

    Eduard

    Buy Me A Coffee

  • @eduard, thanks for your response. I'll try 3 and while waiting for their response, I'll try the second recommendation as well.

    I already downloaded the SDK files. The manual installation guide mentioned that I should "Extract all files for your platform to the same directory as your source files". Can you guide me where to find this source files on my computer (Windows 10, 64 bit, OpenSesame 3.3.10)?

  • Hi Wisnu,

    Sorry for the lat reply. Unfortunately, I don't know the windows file system well enough to guide you to the location. Probably somowhere in C/programs/Opensesame, but other than that I have no clue. Sorry!


    Eduard

    Buy Me A Coffee

  • Hi @eduard ,

    Sorry for my delayed reply, too. Just manage to find time to work on this. Two important updates:

    1. The newest version of the SDK was built on Python 3.8. and it is available here
    2. I managed to find the (what I assume as) correct path (in my case: C:\Program Files (x86)\OpenSesame\Lib\site-packages\IPython\extensions) to put my packages as instructed here. This time, OpenSesame managed to find the package, but I got this error instead:

    If I don't put the packages in the specified path above, I got instead a ModuleNotFoundError with a message: No module named 'tobii_research'

    Any advice on how to continue?

  • Hi,

    Well, that is good news partially. The modulenotfounderror occurs before the ImportError . So therefore we're moving in the right direction.

    For this particular DLL problem, I can't give you specific advice. If the DLLs are present, it could be a path issue (Python doesn't know where to look for them). If so, this might help you: https://stackoverflow.com/questions/3701646/how-to-add-to-the-pythonpath-in-windows-so-it-finds-my-modules-packages

    Also of relevance could be this link here, even though it is then still base don the previous tobii version.

    As a next step you could try to directly import tobii to Opensesame (from within an inlinescript item). Open a new experiment, add an inline_script and add this code: import tobii_research to it. If you get the same error, it might indeed be a path issue, if it works however, the problem could be with Pygaze.

    Eduard

    Buy Me A Coffee

  • Hi @eduard,

    Thanks for your reply. I added the inline script and got the same error. I also checked whether the module tobii_research_interop was present in the specified folder (it is; it has an extension, though: tobii_research_interop.pyd), so I did the statoverflow solution and added the pythonpath:

    Unfortunately, I still got the same 'module not found' error. Note that if I remove the .pyd extension, I got this error instead:

    File "C:\Program Files (x86)\OpenSesame\Lib\site-packages\libopensesame\inline_script.py", line 116, in run
        self.workspace._exec(self.crun)
      File "C:\Program Files (x86)\OpenSesame\Lib\site-packages\libopensesame\base_python_workspace.py", line 124, in _exec
        exec(bytecode, self._globals)
      Inline script, line 1, in <module>
      File "C:\Program Files (x86)\OpenSesame\Lib\site-packages\IPython\extensions\tobii_research.py", line 2, in <module>
        from tobiiresearch.interop import interop
      File "C:\Program Files (x86)\OpenSesame\Lib\site-packages\IPython\extensions\tobiiresearch\interop\interop.py", line 11, in <module>
        from tobiiresearch.interop.python3 import tobii_research_interop
    ImportError: cannot import name 'tobii_research_interop' from 'tobiiresearch.interop.python3' (C:\Program Files (x86)\OpenSesame\Lib\site-packages\IPython\extensions\tobiiresearch\interop\python3\__init__.py)
    

    Let me know if you have more insight and thanks for supporting me this far. I actually know the guy who wrote the blog you referred to; I'll drop him a message as well.

  • The next step would be to actually check in Opensesame whether the path changes were actually effective. To do so, you can work in the debug window, and try to inspect the PATH settings of Python (use stackoverflow to find command that are helpful in this case). If the relevant folder is not in the PATH, we'll know what is happening.

    it is; it has an extension, though: tobii_research_interop.pyd

    not sure, but that could be the issue. Maybe check the path first, and then we can look into this.

    I actually know the guy who wrote the blog you referred to; I'll drop him a message as well.

    This sounds like a good idea. Let us know if you got anything useful from it.

    Eduard

    Buy Me A Coffee

  • @eduard Sorry for my long radio silence. I just had the time to work on this again; since the error initially stemmed from different versions of Python, @sebastiaan suggested installing OpenSesame through Anaconda with Python 3.8, which matches with that of the SDK. This way, if I start OpenSesame through Anaconda it could find the tobii_research module through the console command and installed it without a problem.

    The last thing I had to do was to define the tracker serial number, of which guide can be found here.

    Thanks, everyone for your help!

  • Great that it worked. Happy experimenting!

    Eduard

    Buy Me A Coffee

  • Stumbled on this thread when searching for help with this sort of problem, getting the Tobii SDK to work with Python on one Windows workstation. I got it working just fine on one desktop PC, but could not get it to work on the laptop PC that would run the experiment. pip install tobii_research failed; manual installation of the SDK to the Python site-packages folder got me a little farther, but then ran into the "specified module could not be found" error even though the module was plainly visible.

    Based on this thread, I noticed that the desktop PC (where everything worked) ran Python 3.10.5, while the laptop ran 3.11.1. Removed Python on the laptop, installed 3.10.5, ran pip install tobii_research, and all was well!

    Thanks to everyone here for pointing me to the solution.

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