Tagged: tobii_research python3 avahi
- 05/06/2021 at 12:23 #20465
When I attempt to import tobii_research, I get a crash, that seems to be connected to the shared library, tobii_research_interop.so. Below is what happens with a straight-forward import of tobii_research:
$ python Python 3.6.13 | packaged by conda-forge | (default, Feb 19 2021, 05:36:01) [GCC 9.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import tobii_research as tr >>> python: browser.c:581: avahi_service_browser_new: Assertion 'client' failed. Aborted (core dumped)
When I followed the import path with the python debugger, I saw that importing tobii_research
lead to the importing of tobiiresearch/interop/interop.py
This module imports tobiiresearch/interop/python3/tobii_research_interop.so (because I am using Python 3.6)
The line that causes my crash is tobii_research_interop.startup() in line 58. I have
verified this as follows:
$ python Python 3.6.13 | packaged by conda-forge | (default, Feb 19 2021, 05:36:01) [GCC 9.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from tobiiresearch.interop.python3 import tobii_research_interop >>> tobii_research_interop.startup() >>> python: browser.c:581: avahi_service_browser_new: Assertion 'client' failed. Aborted (core dumped)
Because tobiiresearch/interop/python3/tobii_research_interop.so is a shared library, I can’t
trace things any further. I am running Ubuntu 18.04 with Python 3.16.13. The version of avahi on my system is 0.7.
What do I need to change?06/06/2021 at 04:28 #20467
Added information I should have mentioned: I’m using Tobii TX300 Eye Tracker, which I am able to calibrate before trying to import tobii_research
06/06/2021 at 05:22 #20470
- This reply was modified 2 weeks, 2 days ago by Steven.
Also, I am using an anaconda environment. I tried specifically installing python-avahi, but to no avail06/06/2021 at 16:47 #20471
The issue seems to involve packages installed/uninstalled by the psychopy conda installer. If I create a fresh environment with Python 3.6.13, and then install tobii-research with pip install tobii-research, all is well. I can import tobii_research as tr, and find all eyetrackers with tr.find_all_eyetrackers().
However, if I first create a conda environment using the installer provided by psychopy – conda env create -n psychopy -f psychopy-env.yml, and then use pip install tobii-research, I recreate my problem importing tobii_research.
I suspect this has something to do with the fact that psychopy uses cached websocket_client-1.0.1-py2.py3-none-any.whl and uninstalled my websocket-client-0.57.0. But, I don’t really know.07/06/2021 at 14:09 #20484Grant [Tobii]Keymaster
Hi Steven, glad to hear your found a resolution to the issue. I would point out however that this forum is focused for the Tobii Tech range of trackers and associated SDK (Interaction Library & Stream Engine)
Should you require further support related to the python bindings of the Pro SDK, please get in touch with the Tobii Pro Support department directly @ https://www.tobiipro.com/contact/support/
Thanks for your understanding and best wishes.
- You must be logged in to reply to this topic.