pylink AttributeError "split"
Hi, i've been trying to get the eyelink to work on our windows (10) system. I thought I was running into versions of python, os, pylink, pygaze etc not being compatible with each other, so decided to just update all of them (ie., I reinstalled OS and the SR development package and copied their pygaze folder to the OS folder). Now I'm still running into the following error when I try to initialze the eyelink using pygaze_init:
Unexpected error item-stack: experiment[run].pygaze_init[run] time: Wed Jul 14 14:39:48 2021 exception type: AttributeError exception message: module 'pylink.__version__' has no attribute 'split' Traceback: File "C:\Program Files (x86)\OpenSesame\Lib\site-packages\libqtopensesame\misc\process.py", line 158, in run exp.run() File "C:\Program Files (x86)\OpenSesame\Lib\site-packages\libopensesame\experiment.py", line 470, in run self.items.execute(self.var.start) File "C:\Program Files (x86)\OpenSesame\Lib\site-packages\libopensesame\item_store.py", line 103, in execute self.run(name) File "C:\Program Files (x86)\OpenSesame\Lib\site-packages\libopensesame\item_store.py", line 122, 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 122, in run self[name].run() File "C:\Program Files (x86)\OpenSesame\share\opensesame_plugins\pygaze_init\pygaze_init.py", line 229, in run **kwdict) File "C:\Program Files (x86)\OpenSesame\Lib\site-packages\pygaze\eyetracker.py", line 71, in __init__ self.__class__.__init__(self, display, **args) File "C:\Program Files (x86)\OpenSesame\Lib\site-packages\pygaze\_eyetracker\libeyelink.py", line 177, in __init__ self.eyelink_graphics = EyelinkGraphics(self, _eyelink) File "C:\Program Files (x86)\OpenSesame\Lib\site-packages\pygaze\_eyetracker\eyelinkgraphics.py", line 100, in __init__ pl_version = pylink.__version__.split(".") AttributeError: module 'pylink.__version__' has no attribute 'split'
OS tells me the following packages are installed:
Modules and packages
Python 3.7.6 | packaged by conda-forge | (default, Jan 7 2020, 21:48:41) [MSC v.1916 64 bit (AMD64)]
PIL/ PILLOW [version unknown]
I'm not sure if I'm doing something stupid or if I just missed something. Hope someone could point me in the right direction. Thanks!
ps. I copied the "pylink" folder from "C:\Program Files (x86)\SR Research\EyeLink\SampleExperiments\Python\64\3.7" to the main OS folder
the file __version __.py located in C:\Program Files (x86)\OpenSesame\pylink contains the following:
and in the OS console it seems the split functions works fine on a string like that (I don't use python alot so I can't tell if it's common in 2.7 vs 3.x etc.)
I commented out some lines in C:\Program Files (x86)\OpenSesame\Lib\site-packages\pygaze\_eyetracker\eyelinkgraphics.py and forced the crosshair. It works now, but pretty sure this is not the correct solution.
I'm adding my comment here so I can find this thread later. I'm having the same problem, and hoping someone finds a permanent solution. I'll try this fix for now though, thanks!.
@robbertmijn @joeymac This is due to updated to the EyeLink SDK. This has also broken the fixation-triggered drift correction. It's on the radar, and once we've resolved it we'll update PyGaze. For now you can also replace
eyelinkgraphics.pywith the version from this branch (this only addresses the
__version__error though, not the fixation-triggered drift correction):
Here's another one who had the wonderful idea of updating the set up in these days, because why not? 😅 🤦♀️
@sebastiaan , I see that the link you posted over here is not working any more, will there be news soon?
should we wait on the new version of opensesame?
Hi @ChiaraDL ,
The fix has been merged, but we're still waiting on @Edwin (!) to actually tag the release and update it to PyPi. However, in the meanwhile you can update directly from the git repository:
Thank you @sebastiaan 🙏 I will look into that!
Here I am again, I finally got the time to fix this problem following your suggestion @sebastiaan .
Everything seems to work fine but when I launch opensesame I get this message:
RuntimeError: module compiled against API version 0xe but this version of numpy is 0xd
is this going to be an issue? The experiment seems to start alright...
@ChiaraDL The numpy error originates from something else, although I'm not sure what. It appears harmless. PyLink is now actually also updated on PyPi, so you can also run:
And it will be included in OpenSesame 3.3.11, which we will probably release in the next two weeks or so.