Home Forums Software Development AttributeError: 'module' object has no attribute 'find_all_eyetrackers'

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #7969
    ZIWEI HE
    Participant

    I would like to try some tutor python examples as in http://developer.tobiipro.com/python/python-step-by-step-guide.html

    but I met errors on Pycharm after I import tobii-research package on Pycharm and also extract and copy the whole tobiiresearch folder into the sitepackage

    The Error is:

    Traceback (most recent call last):
    File “D:/Users/Ziwei He/PycharmProjects/tobii/data_collection.py”, line 4, in <module>
    found_eyetrackers = tr.find_all_eyetrackers()
    AttributeError: ‘module’ object has no attribute ‘find_all_eyetrackers’

    #7973
    Grant [Tobii]
    Keymaster

    HI @xp1632, The Tobii Pro SDK Python Bindings are part of the Tobii Pro business department.
    This forum is intended for support with the Tobii EyeX and C4 Eye Tracker and associated SDK’s.

    Please get in touch with Tobii Pro Support department directly @ http://www.tobiipro.com/contact/contact-support/ for an answer to your query.

    However, it would appear that you may need to just setup your paths correct.. perhaps try a folder without whitespace.

    #11811
    Holly Wilson
    Participant

    Hello, Did you fix this issue? I am currently experiencing the same problem.
    Holly

    #11812
    Grant [Tobii]
    Keymaster

    Hi @wilsh435, please bear in mind the Tobii Pro SDK Python Bindings will not work with the Tobii 4C Eye Tracker unless you have already purchased the specific unlock licence to do so. Should you be in possession of a Tobii Pro Eye Tracker, then please get in touch with the Tobii Pro Support department whose contact details I have posted above. Thanks.

    #12097
    Matthew
    Participant

    A lead on a solution: first, though I think everyone that’s posted so far already knows this, it seems the documentation is currently wrong: import from tobiiresearch, rather than tobii-research. (Note that I did the manual download rather than the pip install, because pip couldn’t find the package.)

    Second, this seems a little hacky, but you can try the following:

    import tobiiresearch.implementation.EyeTracker as ET
    found_eyetrackers = ET.find_all_eyetrackers()
    my_eyetracker = found_eyetrackers[0]

    This half works, for me – the resulting my_eyetracker has the correct address, model, reasonable dimensions, etc.

    HOWEVER, so far it doesn’t seem to be getting eye data – I subscribe with my callbacks, yet my callbacks are not called. I will try to update this post if I discover anything further of use.

    #18803
    geraldwarp
    Participant

    This error happens because there is no attribute with the name you called, for that Object. This means that you got the error when the “module” does not contain the method you are calling. But it is evident that the method is there, which leads to believe that may be the method was added by you in the python source code after you had already imported the file (module). Or, some times packages get deprecated and they rename some functions. If that is true, then you may want to exit and reimport the module once again to be able to access the new method.

    You can do it in another way to reimport the module with changes without having to exit the interpreter is to do the following:

    import importlib
    importlib.reload(myModule)
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.