Pylink modules missing from installation?

675 views
Skip to first unread message

Jit Wei, Aaron Ang

unread,
Apr 7, 2016, 3:04:20 AM4/7/16
to psychopy-users
I am aware that pylink supposedly comes along with the psychopy installation. While I am able to import the pylink module, I am still get the following errors which state that the functions for the pylink module are missing. I tried reinstalling psychopy but it doesn't fix the problem. Am I missing out something here?

######### Running: /home/perception/Desktop/Pylink Examples/simple.py ##########
Traceback (most recent call last):
  File "/home/perception/Desktop/Pylink Examples/simple.py", line 239, in <module>
    eyelinktracker = pylink.EyeLink()
AttributeError: 'module' object has no attribute 'EyeLink'
()

######### Running: /home/perception/Desktop/Pylink Examples/simple.py ##########
Traceback (most recent call last):
  File "/home/perception/Desktop/Pylink Examples/simple.py", line 244, in <module>
    pylink.openGraphics((SCREENWIDTH, SCREENHEIGHT),32)
AttributeError: 'module' object has no attribute 'openGraphics'
()

######### Running: /home/perception/Desktop/Pylink Examples/simple.py ##########
Traceback (most recent call last):
  File "/home/perception/Desktop/Pylink Examples/simple.py", line 248, in <module>
    getEYELINK().openDataFile(edfFileName)       
NameError: name 'getEYELINK' is not defined
()

######### Running: /home/perception/Desktop/Pylink Examples/simple.py ##########
Traceback (most recent call last):
  File "/home/perception/Desktop/Pylink Examples/simple.py", line 251, in <module>
    pylink.flushGetkeyQueue()
AttributeError: 'module' object has no attribute 'flushGetkeyQueue'
()

######### Running: /home/perception/Desktop/Pylink Examples/simple.py ##########
Traceback (most recent call last):
  File "/home/perception/Desktop/Pylink Examples/simple.py", line 252, in <module>
    getEYELINK().setOfflineMode()                         
NameError: name 'getEYELINK' is not defined
()

Jonathan Peirce

unread,
Jun 15, 2016, 12:01:45 PM6/15/16
to psychop...@googlegroups.com
What computer system was this?
--
You received this message because you are subscribed to the Google Groups "psychopy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to psychopy-user...@googlegroups.com.
To post to this group, send email to psychop...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/psychopy-users/c4886071-a651-4e8c-9a14-39d929c2c2f9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
Jonathan Peirce
University of Nottingham

http://www.peirce.org.uk


This message and any attachment are intended solely for the addressee
and may contain confidential information. If you have received this
message in error, please send it back to me, and immediately delete it. 

Please do not use, copy or disclose the information contained in this
message or in any attachment.  Any views or opinions expressed by the
author of this email do not necessarily reflect the views of the
University of Nottingham.

This message has been checked for viruses but the contents of an
attachment may still contain software viruses which could damage your
computer system, you are advised to perform your own checks. Email
communications with the University of Nottingham may be monitored as
permitted by UK legislation.

Egor Ananyev

unread,
Aug 12, 2016, 4:21:25 AM8/12/16
to psychopy-users
I get the same issue on Mac OS 10.9.5, PsychoPy Version 1.82.01.

Running the code:

from pylink import *
edfFileName
= 'test.edf'
getEYELINK
().openDataFile(edfFileName)


Yields the following error:
  File "/Users/egor/Dropbox/Projects/mc/mc/mcbsf.py", line 65, in <module>
    getEYELINK().openDataFile(edfFileName)
AttributeError: 'NoneType' object has no attribute 'openDataFile'
The following is the output of dir(getEYELINK()):
['__class__', '__delattr__', '__doc__', '__format__', '__getattribute__', '__hash__', '__init__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__']
Thanks!
--Egor

Egor Ananyev

unread,
Aug 12, 2016, 4:41:01 AM8/12/16
to psychopy-users
When I tried to replace the module in the standalone version of PsychoPy (pylink date modified 2012) with the version provided by EyeLink (pylink date modified 2014), I got the following error:

Traceback (most recent call last):
  File "/Users/egor/Dropbox/Projects/mc/mc/mcbsf.py", line 30, in <module>
    from pylink import *
  File "pylinktogo/pylink2.7/lib/python2.7/site-packages/pylink/__init__.py", line 57, in <module>
   
ImportError: dlopen(/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/pylink/pylink.so, 2): Symbol not found: _send_data_file
  Referenced from: /Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/pylink/pylink.so
  Expected in: /Applications/PsychoPy2.app/Contents/MacOS/../Frameworks/eyelink_core.framework/Versions/A/eyelink_core
 in /Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/pylink/pylink.so

Egor Ananyev

unread,
Aug 12, 2016, 5:39:51 AM8/12/16
to psychopy-users
I came across a solution in the second answer to this question: http://stackoverflow.com/questions/35071433/psychopy-and-pylink-example

Apparently, the call needs to be modified to:
el = pl.EyeLink()
el.openDataFile('Test.EDF')

Not sure why this is the case, but it works.

Best,
--Egor

Jon Peirce

unread,
Aug 17, 2016, 5:06:23 AM8/17/16
to psychop...@googlegroups.com
Probably pylink/eyelink has changed its library call. Glad you got it
fixed.

By the way we're now over on http://discourse.psychopy.org and this
google group is now going to be increasingly ignored

Jon


On 12/08/2016 10:39, Egor Ananyev wrote:
>
> Not sure why this is the case, but it works.

--
Jon Peirce
http://www.peirce.org.uk

Reply all
Reply to author
Forward
0 new messages