Howdy, Stranger!

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

Supported by

Installing OpenSesame through Anaconda & tobii-research

edited June 2023 in OpenSesame

Hi all


So, we bought a Tobii Pro Fusion, and I am trying to implement an experiment with OpenSesame.

I followed the instructions found here: https://osdoc.cogsci.nl/3.3/manual/eyetracking/tobii/ so i downloaded Anaconda (Python 3.10) and I installed OpenSesame (https://osdoc.cogsci.nl/3.3/download/#anaconda-cross-platform).

I also tried to follow your suggestion to install pyqode.core and pyqode.python through the suggested channel:

conda install pyqode.core -c cogsci --override-channels
conda install pyqode.python -c cogsci --override-channels

But when trying to execute the command:

pip install soundfile pygame yolk3k opensesame-extension-osf python-qtpip http://files.cogsci.nl/expyriment-0.10.0+opensesame2-py3-none-any.whl

The following error occured (to my PC and also a lab PC, both running Win 10):


Also, when trying to install tobii-research, I got this error message:

I prompted for OpenSesame and it was executed, but with this error:

ModuleNotFoundError: No module named 'pyqode.qt'


Any help?


Thank you,

Fotis Fotiadis

Comments

  • Hi @fotisfotiadis ,

    Installing through conda is convenient but can also get messy quickly. Why don't you try the installation instructions for OpenSesame 4.0? These have been tested recently.

    The psychopy-related errors are annoying but harmless.

    -- Sebastiaan

  • Hi @sebastiaan


    Thank you for your response

    Indeed, using the instructions you suggested allowed me to install OpenSesame.

    But, Anaconda (Anaconda3-2023.03-1-Windows-x86_64.exe) comes with python 3.11.4.

    So, when running OpenSesame, this appears:

    Also, the command pip install tobii-research comes with the same error:

    ERROR: Could not find a version that satisfies the requirement tobii-research (from versions: none)

    ERROR: No matching distribution found for tobii-research


    Any tips on how to run opensesame with python 3.10?


    Thank you again,

    Fotis Fotiadis

  • Hi Fotis,

    when creating the conda environment you can specify the Python version. So instead of

    conda create -n opensesame-py3
    

    do

    conda create -n opensesame-py3 python=3.10
    

    However, playing around with the Python version can cause problems, in the sense that you have to manually add/upgrade/downgrade package until everything works as expected.

    Hope this helps,

    Eduard

    Buy Me A Coffee

  • Hi @eduard

    Thanks for the tip.

    Now OpenSesame is executed in Python 3.10.12 and also tobii-research is imported.

    So, I wanted to make sure that everything works fine before trying to run an eyetracking experiment. But when I tried running old, well-tested .osexp files a new error occurred :

    ImportError: Qt bindings are not installed


    I am sorry for the many queries, but it's really important for me to use our new tracker with OpenSesame.

    Thank you in advance,

    Fotis

  • Hi Fotis,

    If I remember correctly, you can do something like

    python -m pip install pyqt5

    That should install the bindings. At least, I solved issues for me in the past. Not sure it will for you.

    Eduard

    Buy Me A Coffee

  • Hi @eduard

    Sorry for the late response, I was on a short leave.

    Thanks for the tip.

    Unfortunately it did not fix the problem.

    This is the message after executing the command:

    (opensesame-py3) C:\Users\appliedpsylab1>python -m pip install pyqt5

    Requirement already satisfied: pyqt5 in c:\users\appliedpsylab1\anaconda3\envs\opensesame-py3\lib\site-packages (5.15.7)


    Again, no osexp file can be run, and this message appears:

    File "C:\Users\appliedpsylab1\anaconda3\envs\opensesame-py3\lib\site-packages\PIL\Image.py", line 3102, in fromqimage

      raise ImportError(msg)

    ImportError: Qt bindings are not installed


    So, I've hit a a dead end. Are other users able to install and run OpenSesame this way? I'm sure there much be a solution, since multiple labs use Tobii eyetrackers with OpenSesame.

    Do you think that upgrading from Win10 to Win11 is worth trying?

    Perhaps some other tip?


    Thank you again,

    Fotis.

  • Hi @fotisfotiadis ,

    I encountered (and fixed) this issue as well. It's due to a new version of pillow (10) in which PyQt5 is deprecated (for unclear reasons). And since PyQt5 is the only version of PyQt that Anaconda offers, this causes all kinds of mayhem.

    This is fixed in the dependencies of OpenSesame now though (by constraining the version of pillow ). So if you clear your conda environment and redo all the steps from the documentation, then you should be good.

    — Sebastiaan

  • Hi @sebastiaan

    Indeed, the problem is fixed.

    Thank you!

  • Hi @sebastiaan @fotisfotiadis

    I am using the same setup and have encountered the same problem as fotis. I managed to setup the virtual environment correctly so that tobii-research can be installed. Osexp files, in my case can be run. Only when I activate the pygaze items the experiment crashes when trying to start the calibration.


    Even without the pygaze items my console is flooded with this message:

    [2024-02-20 13:12:59,882:richtext:227:INFO] no Qt bindings, using custom QImage to PIL conversion

    With the items active I get these messages:


     File "C:\Users\s1607057\AppData\Local\anaconda3\envs\os-py3\lib\site-packages\pygaze\_eyetracker\libtobii.py", line 387, in calibrate

      calibration.enter_calibration_mode()

     File "C:\Users\s1607057\AppData\Local\anaconda3\envs\os-py3\lib\site-packages\tobiiresearch\implementation\ScreenBasedCalibration.py", line 168, in enter_calibration_mode

      interop.calibration_enter_calibration_mode(self.__core_eyetracker)

     File "C:\Users\s1607057\AppData\Local\anaconda3\envs\os-py3\lib\site-packages\tobiiresearch\interop\interop.py", line 217, in calibration_enter_calibration_mode

      _on_error_raise_exception(status[0])

     File "C:\Users\s1607057\AppData\Local\anaconda3\envs\os-py3\lib\site-packages\tobiiresearch\implementation\Errors.py", line 176, in _on_error_raise_exception

      raise EyeTrackerDisplayAreaNotValidError("The display area is not valid. " + str(status))

    tobiiresearch.implementation.Errors.EyeTrackerDisplayAreaNotValidError: "The display area is not valid. 'display_area_not_valid'"


    I have already re-installed the newest version of conda and updated it to 24.1.2 and followed the documentation. Python 3.10.12 is installed just like fotis did.

    I am thinking since july last year a new opensesame version could have been released and it is not constraining the version of pillow that was causing trouble. Could that be the case?


    Until now the forum entries were a great help with my project. However, I reached the point where I have to ask for help myself.

    Kind regards,

    Jonas

  • Hi @Jonas_S ,

    This error is unrelated to pillow and comes from the tobii-research package. Beyond that, it's difficult for me to say anything about it, because the error message isn't very descriptive and I don't have a Tobii tracker myself. Maybe @fotisfotiadis has seen this error message before. If not, then I would contact the Tobii developers themselves (assuming you have some kind of support from them).

    — Sebastiaan

Sign In or Register to comment.