event.waitKeys() causing freezing issues

Hello,

I developed an experiment script that is being used by both our lab and another lab. In the other lab’s setup, they have been experiencing seemingly random freezes on calls to event.waitKeys(). The freezes occur on anywhere from 10-50% of the runs, and do not follow a consistent pattern. The freezes also never give an error code, which has made this problem difficult to diagnose.

When the program freezes, the CPU spikes to 100% usage, and the program will not respond until forced to quit. We determined that this is likely not a memory leak problem, as it can occur on the very first run of a session and does not increase in frequency throughout a session. We also used Activity Monitor to track memory usage, and did not notice a notable increase during the runs/sessions.

The freezes occur on several (but not all) machines that we tested on. The main computer that will be used to run the program is a Macbook Pro laptop, as well as a Mac mini, both of which exhibit the freezing problem. In my home lab, I have not been able to replicate the freezing issue on either a Mac or PC.

The freezing stops when I replace the event.waitKeys() with core.wait(). This isn’t a real solution for us however, because we need the event.waitKeys() to help sync the program timing with our MRI, using the TTL pulses to trigger the start of the program (the TTL pulses are either a ‘t’ or a ‘5’ depending on the setup).

Does anybody know what could be causing this? Any help is greatly appreciated!

Here’s some sample code from the script in which the freezing occurs:

if calibrate_targ:
    calib_x = [l_marg, 0, r_marg, 0]
    calib_y = [0, t_marg, 0, b_marg]
    calib_text = 'You will now be presented with the target so that you will have an idea of what the image looks like in your peripheral vision. Please press %s to indicate that you have seen the target in each location. Press %s to begin.' % (response_key, response_key)
    inst_text.text = calib_text
    inst_text.draw()
    targ_image.image = image_fns[targ]
    win.flip()
    event.waitKeys(keyList = [response_key], clearEvents = True)
    targ_image.draw()
    win.flip()
    event.waitKeys(keyList = [response_key], clearEvents = True)
    for c in list(range(0, 4)):
        targ_image.pos = (calib_x[c], calib_y[c])
        targ_image.draw()
        fix_circle.draw()
        fix_cross.draw()            
        fix_dot.draw()
        win.flip()
        event.waitKeys(keyList = [response_key], clearEvents = True)
    win.flip()

Here’s a google drive .zip with the full script, images, and environment info:

event.waitKeys() only receives events if the PsychoPy Window is active / in the forground. Perhaps something is causing the psychopy window to loose focus and therefore stop receiving keyboard events via event.waitKeys().

Since you are using iohub for the eye tracker access, one thing you could try is the iohub keyboard device to get keyboard events. iohub uses system wide keyboard hooks to get keyboard events, so it does not matter if the psychopy window has focus or not.

To switch the experiment to use the iohub keyboard device to get keys:

Get the iohub keyboard device:

# From your script
io = launchHubServer(**tracker_config)
et = io.devices.tracker

# get the keyboard device
iokeyboard = io.devices.keyboard

Then you can replace event.waitKeys(keyList = [response_key], clearEvents = True) with:

iokeyboard.waitForPresses(keys=[response_key], clear=True)

Note: the iohub keyboard currently maps some keys to different labels than event.getKeys(), so if you want to wait for the space key, use keys=[' '] instead of keys=['space'].

Thank you

Hi @sol, thanks for your response. Unfortunately, I don’t think that workaround is a solution for us. We also need this waiting functionality when running the script without access to an eyetracker (the eyetracker code is conditional for this reason, determined by an initial GUI menu). I did attempt to test this by trying to simulate the eyetracker via the configuration code, but it looks like you still need to be physically connected to an eyetracker for that to work.

Apart from that, this may not help solve the issue as we do need to collect responses during the experiment (done via event.getKeys()), so the window is losing focus, I think we would need a way to prevent that or re-focus the computer to the program window. Also, is it typical that losing focus from the window should spike the CPU and freeze the program? Hypothetically if the program lost focus, we could click on the window again to re-focus, but instead it instantly freezes.

We did suspect that maybe the peripheral hardware (keyboard-mouse, eyetracker ethernet) or background software was causing the program to lose focus, so we disconnected all hardware from the laptop and closed all background processes, but the program still has a chance to freeze. Do you have any other ideas about how we can fix this problem?

Hi @jeffkravitz. thanks for the update.

we also need this waiting functionality when running the script without access to an eyetracker

You can start iohub and access the keyboard (no eye tracker) by calling launchHubServer without any arguements. For example:

io = launchHubServer()
# get the keyboard device
iokeyboard = io.devices.keyboard

we do need to collect responses during the experiment (done via event.getKeys() ),

That is another reason to use iohub instead. iohub has better event timing than event.getKeys() because iohub runs async to win.flip(). Replace event.getKeys() with iokeyboard.getPresses() for example, which will return a list of any key presses, each as an object with .key and .time attributes.

Also, is it typical that losing focus from the window should spike the CPU and freeze the program?

Running a psychopy script will spike the CPU unless your script is calling time.sleep(0.0xx) frequently, in or out of focus. :wink: The event.waitKeys() ‘freezing’ is ( I’m guessing ) from the window loosing focus.

If the issue is because the window is loosing focus, I really think using iohub for the keyboard event timing is the easiest way to solve it. Since you have iohub running in the eye tracker condition already, adapting the script to use it without the eye tracker just for keyboard events should be pretty easy.

If you decide to give this route another go and run into any specific issues moving away from event.get\wait.. please let us know.

thanks again

Hi @sol thanks for your reply. I’ve tried to implement the changes you suggested, but I’ve run into some trouble. I now get the following error when trying to launch ioHub:

 *** iohub warning: Display / Monitor unit type has not been set.
Traceback (most recent call last):
  File "rsvp_sweep.py", line 625, in <module>
    io = launchHubServer()
  File "/Users/jeff/.conda/envs/ioWait_test_env/lib/python3.6/site-packages/psychopy/contrib/lazy_import.py", line 120, in __call__
    return obj(*args, **kwargs)
  File "/Users/jeff/.conda/envs/ioWait_test_env/lib/python3.6/site-packages/psychopy/iohub/client/connect.py", line 290, in launchHubServer
    return ioHubConnection(iohub_config)
  File "/Users/jeff/.conda/envs/ioWait_test_env/lib/python3.6/site-packages/psychopy/iohub/client/__init__.py", line 289, in __init__
    raise RuntimeError('Error starting ioHub server: {}'.format(self.iohub_status))
RuntimeError: Error starting ioHub server: ioHub startup failed.
ioHub Server Process Completed With Code:  Negsignal.SIGSEGV

I’ve tried downgrading pyglet to 1.3.1 (as you suggest here), but I get some error messages when trying to setup the environment. It looks like pyglet 1.3.1 isn’t available for Mac, and isn’t compatible with my psychopy version (which isn’t as important). Do you know which version of psychopy I can download to make io = launchHubServer() work properly? Also, I use Anaconda to manage the environment, if that helps at all.

 pip install pyglet==1.3.1
Collecting pyglet==1.3.1
  Using cached pyglet-1.3.1-py2.py3-none-any.whl (1.0 MB)
Requirement already satisfied: future in /Users/jeff/.conda/envs/ioWait_test_env/lib/python3.6/site-packages (from pyglet==1.3.1) (0.18.2)
Installing collected packages: pyglet
  Attempting uninstall: pyglet
    Found existing installation: pyglet 1.5.16
    Uninstalling pyglet-1.5.16:
      Successfully uninstalled pyglet-1.5.16
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
psychopy 2021.2.3 requires jedi>=0.16, which is not installed.
psychopy 2021.2.3 requires psychtoolbox, which is not installed.
psychopy 2021.2.3 requires pygame, which is not installed.
psychopy 2021.2.3 requires pyo, which is not installed.
psychopy 2021.2.3 requires pyobjc; platform_system == "Darwin", which is not installed.
psychopy 2021.2.3 requires python-vlc>=3.0.12118; platform_system != "Windows", which is not installed.
psychopy 2021.2.3 requires tobii-research; python_version <= "3.6", which is not installed.
psychopy 2021.2.3 requires ujson, which is not installed.
psychopy 2021.2.3 requires pyglet>=1.5; platform_system == "Darwin", but you have pyglet 1.3.1 which is incompatible.
Successfully installed pyglet-1.3.1

Using pyglet-1.5.16 on macOS should be fine. On Windows it needs to be 1.4.11.

On macOS, you need to add the app you are running the script with to the System Preferences-> Security & Privacy → Privacy - Accessibility app list.

UPDATE: Determined that the iohub eyelink issue on macOS has to do with the version of pylink included in the macOS standalone in versions 2021.2.x. This will be fixed in the next sttandalone release. If you are running with your own Python 3.8 env., installing the latest version of pylink using pip seems to work:

pip install --index-url=https://pypi.sr-support.com sr-research-pylink

The EyeLink Display API / Software needs to also be installed for pylink to work.

If you continue to have issues, could you try running one of the iohub coder demos, like psychopy/demos/coder/iohub/keyboard.py, to see if the issue is with the setup / python env. or in the script being run.

Thank you

Hey @sol Adding my terminal to Accessibility helped overcome the first hurdle, but now I get something strange. When I run the script, the program seems to run normally, except the mouse turns into the rainbow loading wheel and waits. Then when I press a key, it spams this r is None: line. Here’s the full output:

(rsvp_prf_env) [ jeff @ ultron /home/jeff/docs/imagery_docs/experiments/rsvp_prf_iowait ] python rsvp_sweep.py



>-----------Start-Run-----------< 

Subject:          JK
Run:              1
Stim Duration:    400 ms
Target Cooldown:  1000 ms
Response Period:  900 ms
Eyetracking:      False
MRI:              True


RPC_ATTRIBUTE_ERROR
Traceback (most recent call last):
  File "/Users/jeff/.conda/envs/rsvp_prf_env/lib/python3.6/site-packages/psychopy/iohub/server.py", line 108, in handle
    result = getattr(self, unicode(callable_name, 'utf-8'))
TypeError: decoding str is not supported
r is None: ('EXP_DEVICE', 'DEV_RPC', 'Keyboard', 'getCurrentDeviceState', (), {})
r is None: ('EXP_DEVICE', 'DEV_RPC', 'Keyboard', 'getCurrentDeviceState', (), {})
r is None: ('EXP_DEVICE', 'DEV_RPC', 'Keyboard', 'getCurrentDeviceState', (), {})

It then prints that line repeatedly until I force quit, finishing with:

r is None: ('EXP_DEVICE', 'DEV_RPC', 'Keyboard', 'getCurrentDeviceState', (), {})
Terminated: 15

The outcome from running the keyboard.py script is similiar:

(rsvp_prf_env) [ jeff @ ultron /users/jeff/.conda/envs/rsvp_prf_env/lib/python3.6/site-packages/psychopy/demos/coder/iohub ] python keyboard.py
RPC_ATTRIBUTE_ERROR
Traceback (most recent call last):
  File "/Users/jeff/.conda/envs/rsvp_prf_env/lib/python3.6/site-packages/psychopy/iohub/server.py", line 108, in handle
    result = getattr(self, unicode(callable_name, 'utf-8'))
TypeError: decoding str is not supported
RPC_ATTRIBUTE_ERROR
Traceback (most recent call last):
  File "/Users/jeff/.conda/envs/rsvp_prf_env/lib/python3.6/site-packages/psychopy/iohub/server.py", line 108, in handle
    result = getattr(self, unicode(callable_name, 'utf-8'))
TypeError: decoding str is not supported
r is None: ('EXP_DEVICE', 'DEV_RPC', 'Keyboard', 'getCurrentDeviceState', (), {})
r is None: ('EXP_DEVICE', 'DEV_RPC', 'Keyboard', 'getCurrentDeviceState', (), {})
r is None: ('EXP_DEVICE', 'DEV_RPC', 'Keyboard', 'getCurrentDeviceState', (), {})

and after 15 seconds, finishes with:

r is None: ('EXP_DEVICE', 'DEV_RPC', 'Keyboard', 'getCurrentDeviceState', (), {})
4.1361 	WARNING 	Monitor specification not found. Creating a temporary one...
ioHub Server Process Completed With Code:  0

I use pylink3.6 from the Eyelink Dev Kit, is that ok? I don’t think I’ve had any problems with it. Or do you think that has something to do with the freezing? Also, do you know what RPC_ATTRIBUTE_ERROR is?
It seems I can’t attach a .yml or .txt, so I’ll just paste my environment here in case that helps.

name: RSVP_pRF_env
channels:
  - conda-forge
  - defaults
dependencies:
  - alabaster=0.7.12=pyhd3eb1b0_0
  - appdirs=1.4.4=py_0
  - applaunchservices=0.2.1=py_0
  - appnope=0.1.2=py36hecd8cb5_1001
  - argh=0.26.2=py36_0
  - arrow=0.13.1=py36_0
  - astroid=2.6.4=py36hecd8cb5_0
  - atomicwrites=1.4.0=py_0
  - attrs=21.2.0=pyhd3eb1b0_0
  - autopep8=1.5.6=pyhd3eb1b0_0
  - babel=2.9.1=pyhd3eb1b0_0
  - backcall=0.2.0=pyhd3eb1b0_0
  - binaryornot=0.4.4=pyhd3eb1b0_1
  - black=19.10b0=py_0
  - bleach=3.3.1=pyhd3eb1b0_0
  - brotlipy=0.7.0=py36h9ed2024_1003
  - ca-certificates=2021.7.5=hecd8cb5_1
  - certifi=2021.5.30=py36hecd8cb5_0
  - click=8.0.1=pyhd3eb1b0_0
  - cloudpickle=1.6.0=py_0
  - cookiecutter=1.7.2=pyhd3eb1b0_0
  - dbus=1.13.18=h18a8e69_0
  - defusedxml=0.7.1=pyhd3eb1b0_0
  - diff-match-patch=20200713=py_0
  - docutils=0.17.1=py36hecd8cb5_1
  - entrypoints=0.3=py36_0
  - expat=2.2.10=hb1e8313_2
  - flake8=3.9.0=pyhd3eb1b0_0
  - future=0.18.2=py36_1
  - gettext=0.19.8.1=hb0f4f8b_2
  - glib=2.66.1=h9bbe63b_0
  - icu=58.2=h0a44026_3
  - idna=2.10=pyhd3eb1b0_0
  - imagesize=1.2.0=pyhd3eb1b0_0
  - importlib-metadata=3.10.0=py36hecd8cb5_0
  - importlib_metadata=3.10.0=hd3eb1b0_0
  - inflection=0.5.1=py36hecd8cb5_0
  - intervaltree=3.1.0=py_0
  - ipykernel=5.3.4=py36h5ca1d4c_0
  - ipython=7.16.1=py36h5ca1d4c_0
  - ipython_genutils=0.2.0=pyhd3eb1b0_1
  - isort=5.9.2=pyhd3eb1b0_0
  - jedi=0.17.2=py36hecd8cb5_1
  - jinja2=2.11.3=pyhd3eb1b0_0
  - jinja2-time=0.2.0=pyhd3eb1b0_2
  - jpeg=9b=he5867d9_2
  - jsonschema=3.2.0=py_2
  - jupyter_client=6.1.12=pyhd3eb1b0_0
  - jupyter_core=4.7.1=py36hecd8cb5_0
  - keyring=23.0.1=py36hecd8cb5_0
  - lazy-object-proxy=1.6.0=py36h9ed2024_0
  - libcxx=10.0.0=1
  - libedit=3.1.20191231=h1de35cc_1
  - libffi=3.3=hb1e8313_2
  - libiconv=1.16=h1de35cc_0
  - libpng=1.6.37=ha441bb4_0
  - libsodium=1.0.18=h1de35cc_0
  - libspatialindex=1.9.3=h23ab428_0
  - markupsafe=1.1.1=py36h1de35cc_0
  - mccabe=0.6.1=py36_1
  - mistune=0.8.4=py36h1de35cc_0
  - mypy_extensions=0.4.3=py36_0
  - nbconvert=5.6.1=py36_0
  - nbformat=5.1.3=pyhd3eb1b0_0
  - ncurses=6.2=h0a44026_1
  - numpydoc=1.1.0=pyhd3eb1b0_1
  - openssl=1.1.1k=h9ed2024_0
  - packaging=21.0=pyhd3eb1b0_0
  - pandoc=2.12=hecd8cb5_0
  - pandocfilters=1.4.3=py36hecd8cb5_1
  - pathspec=0.7.0=py_0
  - pcre=8.44=hb1e8313_0
  - pexpect=4.8.0=pyhd3eb1b0_3
  - pickleshare=0.7.5=pyhd3eb1b0_1003
  - pip=20.2.4=py36hecd8cb5_0
  - pluggy=0.13.1=py36hecd8cb5_0
  - poyo=0.5.0=pyhd3eb1b0_0
  - prompt-toolkit=3.0.17=pyh06a4308_0
  - ptyprocess=0.7.0=pyhd3eb1b0_2
  - pycodestyle=2.6.0=pyhd3eb1b0_0
  - pycparser=2.20=py_2
  - pydocstyle=6.1.1=pyhd3eb1b0_0
  - pyflakes=2.2.0=pyhd3eb1b0_0
  - pygments=2.9.0=pyhd3eb1b0_0
  - pylint=2.9.3=py36hecd8cb5_1
  - pyls-black=0.4.6=hd3eb1b0_0
  - pyls-spyder=0.3.2=pyhd3eb1b0_0
  - pyparsing=2.4.7=pyhd3eb1b0_0
  - pyqt=5.9.2=py36h655552a_2
  - pyrsistent=0.17.3=py36haf1e3a3_0
  - pysocks=1.7.1=py36hecd8cb5_0
  - python=3.6.12=h26836e1_2
  - python-jsonrpc-server=0.4.0=py_0
  - python-language-server=0.36.2=pyhd3eb1b0_0
  - python-slugify=5.0.2=pyhd3eb1b0_0
  - python.app=3=py36h9ed2024_0
  - qdarkstyle=3.0.2=pyhd3eb1b0_0
  - qstylizer=0.1.10=pyhd3eb1b0_0
  - qt=5.9.7=h468cd18_1
  - qtawesome=1.0.2=pyhd3eb1b0_0
  - qtconsole=5.1.0=pyhd3eb1b0_0
  - qtpy=1.9.0=py_0
  - readline=8.0=h1de35cc_0
  - regex=2021.7.6=py36h9ed2024_0
  - rope=0.19.0=pyhd3eb1b0_0
  - rtree=0.9.7=py36hecd8cb5_1
  - setuptools=50.3.0=py36hecd8cb5_1
  - sip=4.19.8=py36h0a44026_0
  - snowballstemmer=2.1.0=pyhd3eb1b0_0
  - sortedcontainers=2.4.0=pyhd3eb1b0_0
  - sphinx=4.0.2=pyhd3eb1b0_0
  - sphinxcontrib-applehelp=1.0.2=pyhd3eb1b0_0
  - sphinxcontrib-devhelp=1.0.2=pyhd3eb1b0_0
  - sphinxcontrib-htmlhelp=2.0.0=pyhd3eb1b0_0
  - sphinxcontrib-jsmath=1.0.1=pyhd3eb1b0_0
  - sphinxcontrib-qthelp=1.0.3=pyhd3eb1b0_0
  - sphinxcontrib-serializinghtml=1.1.5=pyhd3eb1b0_0
  - spyder=5.0.5=py36hecd8cb5_2
  - spyder-kernels=2.0.5=py36hecd8cb5_0
  - sqlite=3.33.0=hffcf06c_0
  - testpath=0.5.0=pyhd3eb1b0_0
  - text-unidecode=1.3=py_0
  - textdistance=4.2.1=pyhd3eb1b0_0
  - three-merge=0.1.1=pyhd3eb1b0_0
  - tinycss=0.4=pyhd3eb1b0_1002
  - tk=8.6.10=hb0a8c7a_0
  - toml=0.10.2=pyhd3eb1b0_0
  - tornado=6.1=py36h9ed2024_0
  - traitlets=4.3.3=py36_0
  - typed-ast=1.4.3=py36h9ed2024_1
  - typing-extensions=3.10.0.0=hd3eb1b0_0
  - typing_extensions=3.10.0.0=pyh06a4308_0
  - ujson=4.0.2=py36h23ab428_0
  - unidecode=1.2.0=pyhd3eb1b0_0
  - watchdog=1.0.2=py36h9ed2024_1
  - wcwidth=0.2.5=py_0
  - webencodings=0.5.1=py36_1
  - wheel=0.35.1=py_0
  - whichcraft=0.6.1=pyhd3eb1b0_0
  - wrapt=1.12.1=py36h1de35cc_1
  - wurlitzer=2.1.0=py36hecd8cb5_0
  - xz=5.2.5=h1de35cc_0
  - yaml=0.2.5=haf1e3a3_0
  - yapf=0.31.0=pyhd3eb1b0_0
  - zeromq=4.3.4=h23ab428_0
  - zipp=3.5.0=pyhd3eb1b0_0
  - zlib=1.2.11=h1de35cc_3
  - pip:
    - arabic-reshaper==2.1.1
    - astunparse==1.6.3
    - cffi==1.14.3
    - chardet==3.0.4
    - cryptography==3.2.1
    - cycler==0.10.0
    - decorator==4.4.2
    - dukpy==0.2.3
    - esprima==4.0.1
    - et-xmlfile==1.0.1
    - freetype-py==2.2.0
    - gevent==20.9.0
    - gitdb==4.0.5
    - gitpython==3.1.11
    - glfw==2.0.0
    - greenlet==0.4.17
    - imageio==2.9.0
    - imageio-ffmpeg==0.4.2
    - javascripthon==0.11
    - jdcal==1.4.1
    - json-tricks==3.15.3
    - kiwisolver==1.3.1
    - macropy3==1.1.0b2
    - matplotlib==3.3.2
    - moviepy==1.0.3
    - msgpack==1.0.0
    - msgpack-numpy==0.4.7.1
    - numexpr==2.7.1
    - numpy==1.19.4
    - openpyxl==3.0.5
    - pandas==1.1.4
    - parso==0.7.1
    - pillow==8.0.1
    - proglog==0.1.9
    - psutil==5.7.3
    - psychopy==2020.2.5
    - pyglet==1.5.8
    - pyobjc-core==6.2.2
    - pyobjc-framework-cocoa==6.2.2
    - pyobjc-framework-quartz==6.2.2
    - pyopengl==3.1.5
    - pyopenssl==19.1.0
    - pyosf==1.0.5
    - pyserial==3.4
    - python-bidi==0.4.2
    - python-dateutil==2.8.1
    - python-gitlab==2.5.0
    - pytz==2020.4
    - pyyaml==5.3.1
    - pyzmq==19.0.2
    - questplus==2019.4
    - requests==2.24.0
    - scipy==1.5.3
    - six==1.15.0
    - smmap==3.0.4
    - sounddevice==0.4.1
    - soundfile==0.10.3.post1
    - tables==3.6.1
    - tqdm==4.51.0
    - urllib3==1.25.11
    - websocket-client==0.57.0
    - wxpython==4.1.0
    - xarray==0.16.1
    - xlrd==1.2.0
    - zope-event==4.5.0
    - zope-interface==5.1.2
prefix: /Users/jeff/.conda/envs/RSVP_pRF_env

That is an error coming from iohub itself; it means something went wrong during the remote procedure call to the keyboard getCurrentDeviceState method.

This is probably from a bug in the version of psychopy you are using (2020.2.5). The iohub source code that is giving the error has been updated since 2020.2.5. Can you upgrade to the latest release version of psychopy (2021.2.3) and see if you still get the error?

If it is working, then it is OK. If you get an error about not being able to import pylink and something about _NSApp symbol missing, then upgrade your pylink to their most recent version using the pip url given earlier.

I also just checked the iohub related python dependency versions I have installed in my macOS anaconda env and compared them to yours. The only differences I can spot are small / should be fine as is, but if you are still getting the same error after updating psychopy, try upgrading to these python package versions:

  • gevent 20.12.1
  • msgpack 1.0.2

Thank you

Hey @sol , updated the psychopy env and it has brought me back to the first error:

(ioWait_new_test) [ jeff @ ultron /users/jeff/.conda/envs/ioWait_new_test/lib/python3.6/site-packages/psychopy/demos/coder/iohub ] python keyboard.py
pygame 2.0.2 (SDL 2.0.16, Python 3.6.13)
Hello from the pygame community. https://www.pygame.org/contribute.html
 *** iohub warning: Display / Monitor unit type has not been set.
Traceback (most recent call last):
  File "keyboard.py", line 18, in <module>
    io = launchHubServer()
  File "/Users/jeff/.conda/envs/ioWait_new_test/lib/python3.6/site-packages/psychopy/contrib/lazy_import.py", line 120, in __call__
    return obj(*args, **kwargs)
  File "/Users/jeff/.conda/envs/ioWait_new_test/lib/python3.6/site-packages/psychopy/iohub/client/connect.py", line 290, in launchHubServer
    return ioHubConnection(iohub_config)
  File "/Users/jeff/.conda/envs/ioWait_new_test/lib/python3.6/site-packages/psychopy/iohub/client/__init__.py", line 289, in __init__
    raise RuntimeError('Error starting ioHub server: {}'.format(self.iohub_status))
RuntimeError: Error starting ioHub server: ioHub startup failed.
ioHub Server Process Completed With Code:  Negsignal.SIGSEGV

Both Psychopy and Terminal are both still allowed in my security preferences, so maybe that wasn’t related after all. The new env started with msgpack=1.0.2 already, and I downgraded to gevent=20.12.1 (same error occurred with the original gevent=21.8.0). Here’s a copy of the new env:

name: ioWait_new_test
channels:
  - conda-forge
  - defaults
dependencies:
  - appdirs=1.4.4=pyh9f0ad1d_0
  - arabic_reshaper=2.1.3=pyhd8ed1ab_0
  - astunparse=1.6.3=pyhd8ed1ab_0
  - backports=1.0=py_2
  - backports.lzma=0.0.14=py36hcf28acf_3
  - blosc=1.21.0=he49afe7_0
  - brotlipy=0.7.0=py36hfa26744_1001
  - bzip2=1.0.8=h0d85af4_4
  - c-ares=1.18.0=h0d85af4_0
  - ca-certificates=2021.10.8=h033912b_0
  - cairo=1.16.0=h0ab9d94_1001
  - certifi=2021.5.30=py36h79c6626_0
  - cffi=1.14.6=py36hbc36220_1
  - chardet=4.0.0=py36h79c6626_1
  - colorama=0.4.4=pyh9f0ad1d_0
  - configobj=5.0.6=py_0
  - configparser=5.0.2=pyhd8ed1ab_0
  - cryptography=35.0.0=py36ha6a00b0_0
  - cycler=0.10.0=py_2
  - decorator=4.4.2=py_0
  - dukpy=0.2.3=py36hfa26744_1
  - esprima-python=4.0.1=py_2001
  - et_xmlfile=1.0.1=py_1001
  - expat=2.4.1=he49afe7_0
  - ffmpeg=4.3.2=h4dad6da_1
  - fontconfig=2.13.1=h1027ab8_1000
  - freetype=2.10.4=h4cff582_1
  - freetype-py=2.2.0=pyh9f0ad1d_0
  - future=0.18.2=py36h79c6626_3
  - gettext=0.19.8.1=hd1a6beb_1008
  - gevent=20.12.1=py36h20b66c6_2
  - gitdb=4.0.9=pyhd8ed1ab_0
  - gitpython=3.1.18=pyhd8ed1ab_0
  - glfw=3.3.4=h0d85af4_0
  - glib=2.70.0=hcf210ce_1
  - glib-tools=2.70.0=hcf210ce_1
  - gmp=6.2.1=h2e338ed_0
  - gnutls=3.6.13=h756fd2b_1
  - graphite2=1.3.13=h2e338ed_1001
  - greenlet=1.1.2=py36hefe7e0e_0
  - harfbuzz=2.4.0=h92b87b8_1
  - hdf5=1.10.6=nompi_hc5d9132_1114
  - icu=58.2=h0a44026_1000
  - idna=2.10=pyh9f0ad1d_0
  - imageio=2.9.0=py_0
  - imageio-ffmpeg=0.4.5=pyhd8ed1ab_0
  - jasper=1.900.1=h636a363_1006
  - javascripthon=0.11=py_0
  - jbig=2.1=h0d85af4_2003
  - jpeg=9d=hbcb3906_0
  - json_tricks=3.15.5=pyhd8ed1ab_0
  - kiwisolver=1.3.1=py36hc61eee1_1
  - krb5=1.19.2=hcfbf3a7_2
  - lame=3.100=h35c211d_1001
  - lcms2=2.12=h577c468_0
  - lerc=3.0=he49afe7_0
  - libblas=3.9.0=12_osx64_openblas
  - libcblas=3.9.0=12_osx64_openblas
  - libcurl=7.79.1=hf45b732_1
  - libcxx=12.0.1=habf9029_0
  - libdeflate=1.8=h0d85af4_0
  - libedit=3.1.20191231=h0678c8f_2
  - libev=4.33=haf1e3a3_1
  - libffi=3.4.2=he49afe7_4
  - libflac=1.3.3=h046ec9c_1
  - libgfortran=5.0.0=9_3_0_h6c81a4c_23
  - libgfortran5=9.3.0=h6c81a4c_23
  - libglib=2.70.0=hf1fb8c0_1
  - libiconv=1.16=haf1e3a3_0
  - liblapack=3.9.0=12_osx64_openblas
  - liblapacke=3.9.0=12_osx64_openblas
  - libnghttp2=1.43.0=h6f36284_1
  - libogg=1.3.4=h35c211d_1
  - libopenblas=0.3.18=openmp_h3351f45_0
  - libopencv=4.4.0=py36_2
  - libopus=1.3.1=hc929b4f_1
  - libpng=1.6.37=h7cec526_2
  - libsndfile=1.0.31=he49afe7_1
  - libsodium=1.0.18=hbcb3906_1
  - libssh2=1.10.0=h52ee1ee_2
  - libtiff=4.3.0=hd146c10_2
  - libuv=1.42.0=h0d85af4_0
  - libvorbis=1.3.7=h046ec9c_0
  - libwebp-base=1.2.1=h0d85af4_0
  - libxml2=2.9.9=hd80cff7_2
  - libzlib=1.2.11=h9173be1_1013
  - llvm-openmp=12.0.1=hda6cdc1_1
  - lz4-c=1.9.3=he49afe7_1
  - macropy3=1.1.0b2=py_0
  - matplotlib=3.3.4=py36h79c6626_0
  - matplotlib-base=3.3.4=py36h4ea959b_0
  - mock=4.0.3=py36h79c6626_1
  - moviepy=1.0.1=py_0
  - msgpack-numpy=0.4.7.1=pyh9f0ad1d_0
  - msgpack-python=1.0.2=py36hc61eee1_1
  - ncurses=6.2=h2e338ed_4
  - nettle=3.6=hedd7734_0
  - numexpr=2.7.3=py36he43235d_0
  - numpy=1.19.5=py36h08b5fde_2
  - olefile=0.46=pyh9f0ad1d_1
  - opencv=4.4.0=py36_2
  - openh264=2.1.1=hfd3ada9_0
  - openjpeg=2.4.0=h6e7aa92_1
  - openpyxl=3.0.9=pyhd8ed1ab_0
  - openssl=1.1.1l=h0d85af4_0
  - packaging=21.0=pyhd8ed1ab_0
  - pandas=1.1.5=py36h2be6da3_0
  - pathlib2=2.3.6=py36h79c6626_0
  - pcre=8.45=he49afe7_0
  - pillow=8.3.2=py36h950f3bb_0
  - pip=21.3.1=pyhd8ed1ab_0
  - pixman=0.38.0=h01d97ff_1003
  - portaudio=19.6.0=he49afe7_4
  - proglog=0.1.9=py_0
  - psutil=5.8.0=py36hfa26744_1
  - psychopy=2021.2.3=py36h79c6626_0
  - pthread-stubs=0.4=hc929b4f_1001
  - py-opencv=4.4.0=py36h95af2a2_2
  - pycparser=2.20=pyh9f0ad1d_2
  - pyglet=1.5.16=py36h79c6626_0
  - pyglfw=2.3.0=py36h79c6626_0
  - pyobjc-core=7.3=py36hfa26744_2
  - pyobjc-framework-cocoa=7.3=py36h79c6626_0
  - pyobjc-framework-quartz=7.3=py36h79c6626_0
  - pyopengl=3.1.5=py_0
  - pyopenssl=21.0.0=pyhd8ed1ab_0
  - pyosf=1.0.5=py_2
  - pyparsing=3.0.1=pyhd8ed1ab_1
  - pypubsub=4.0.3=py_0
  - pyqmix=2021.1.2=py36h79c6626_0
  - pyqt=5.6.0=py36hc26a216_1008
  - pyserial=3.5=pyhd8ed1ab_0
  - pysocks=1.7.1=py36h79c6626_3
  - pysoundfile=0.10.3.post1=pyhd3deb0d_0
  - pytables=3.6.1=py36h256c1cb_3
  - python=3.6.13=haf480d7_2_cpython
  - python-bidi=0.4.2=py_0
  - python-dateutil=2.8.2=pyhd8ed1ab_0
  - python-gitlab=2.10.1=pyhd8ed1ab_0
  - python-sounddevice=0.4.1=pyh9f0ad1d_0
  - python.app=1.3=py36hfa26744_5
  - python_abi=3.6=2_cp36m
  - pytz=2021.3=pyhd8ed1ab_0
  - pyyaml=5.4.1=py36hfa26744_1
  - pyzmq=22.3.0=py36h50cd92c_0
  - qt=5.6.2=h822fa55_1013
  - questplus=2019.4=py_0
  - readline=8.1=h05e3726_0
  - requests=2.25.1=pyhd3deb0d_0
  - requests-toolbelt=0.9.1=py_0
  - ruamel.yaml=0.17.16=py36hfa26744_0
  - ruamel.yaml.clib=0.2.2=py36h20b66c6_2
  - scipy=1.5.3=py36h4f136de_1
  - setuptools=58.0.4=py36h79c6626_2
  - sip=4.18.1=py36h0a44026_1000
  - six=1.16.0=pyh6c4a22f_0
  - smmap=3.0.5=pyh44b312d_0
  - sqlite=3.36.0=h23a322b_2
  - tk=8.6.11=h5dbffcc_1
  - tornado=6.1=py36hfa26744_1
  - tqdm=4.62.3=pyhd8ed1ab_0
  - typing_extensions=3.10.0.2=pyha770c72_0
  - urllib3=1.26.7=pyhd8ed1ab_0
  - webassets=2.0=py_0
  - websocket-client=0.57.0=py36h79c6626_4
  - wheel=0.37.0=pyhd8ed1ab_1
  - wxpython=4.0.6=py36h1cd7e00_1
  - x264=1!161.3030=h0d85af4_1
  - xarray=0.18.2=pyhd8ed1ab_0
  - xlrd=2.0.1=pyhd8ed1ab_3
  - xz=5.2.5=haf1e3a3_1
  - yaml=0.2.5=haf1e3a3_0
  - zeromq=4.3.4=he49afe7_1
  - zlib=1.2.11=h9173be1_1013
  - zope.event=4.5.0=pyh9f0ad1d_0
  - zope.interface=5.4.0=py36hfa26744_0
  - zstd=1.5.0=h582d3a0_0
  - pip:
    - psychtoolbox==3.0.18.0
    - pygame==2.0.2
    - pyo==1.0.4
    - pyparallel==0.2.2
prefix: /Users/jeff/.conda/envs/ioWait_new_test

Hi @jeffkravitz, I’m kind of at a loss. I am not able to replicate the issue on Catalina or Big Sur (using anaconda).

If you install the macOS standalone for 2021.2.3, add the PsychoPy app to the security list, and then try running the iohub keyboard.py or mouse.py demo with Coder, does it work for you? Unfortunately the pylink version included in the stand alone is broken in the latest release, but trying it would give a hint as to whether the seg fault is because of the env. or the machine.

I can go over the python dependecies again to see if I spot any differences, but I can’t see a package version difference causing a seg fault type error.

Does the script crash pretty much right after you start it, or does it hang for 30 seconds or so before crashing?

Thank you

Hi @jeffkravitz,

Here is what is installed in my 3.6 conda env on macOS Catalina:

# packages in environment at /Users/sol/opt/anaconda3/envs/psychopy:
#
# Name                    Version                   Build  Channel
alabaster                 0.7.12                   py36_0  
appdirs                   1.4.4              pyh9f0ad1d_0    conda-forge
applaunchservices         0.2.1                      py_0  
appnope                   0.1.2           py36hecd8cb5_1001  
arabic_reshaper           2.0.15                     py_1    conda-forge
argh                      0.26.2                   py36_0  
astroid                   2.5              py36hecd8cb5_1  
astunparse                1.6.2                      py_0    conda-forge
async_generator           1.10             py36h28b3542_0  
atomicwrites              1.4.0                      py_0  
attrs                     20.3.0             pyhd3eb1b0_0  
autopep8                  1.5.5              pyhd3eb1b0_0  
babel                     2.9.0              pyhd3eb1b0_0  
backcall                  0.2.0              pyhd3eb1b0_0  
backports                 1.0                        py_2    conda-forge
backports.lzma            0.0.14           py36hcf28acf_3    conda-forge
black                     19.10b0                    py_0  
bleach                    3.3.0              pyhd3eb1b0_0  
blosc                     1.21.0               h046ec9c_0    conda-forge
brotlipy                  0.7.0           py36ha3de816_1001    conda-forge
bzip2                     1.0.8                hc929b4f_4    conda-forge
c-ares                    1.17.1               hc929b4f_0    conda-forge
ca-certificates           2021.1.19            hecd8cb5_0  
cairo                     1.16.0            h4ec454a_1007    conda-forge
certifi                   2020.12.5        py36hecd8cb5_0  
cffi                      1.14.4           py36hfe0777f_1    conda-forge
chardet                   4.0.0            py36h79c6626_1    conda-forge
click                     7.1.2              pyhd3eb1b0_0  
cloudpickle               1.6.0                      py_0  
colorama                  0.4.4              pyhd3eb1b0_0  
configobj                 5.0.6                      py_0    conda-forge
configparser              5.0.1                      py_0    conda-forge
cryptography              3.3.1            py36hd858a44_1    conda-forge
cycler                    0.10.0                     py_2    conda-forge
dbus                      1.13.6               h0c50699_1    conda-forge
decorator                 4.4.2                      py_0    conda-forge
defusedxml                0.6.0              pyhd3eb1b0_0  
diff-match-patch          20200713                   py_0  
docutils                  0.16                     py36_1  
dukpy                     0.2.3            py36h9de38fb_1    conda-forge
entrypoints               0.3                      py36_0  
esprima-python            4.0.1                   py_2001    conda-forge
et_xmlfile                1.0.1                   py_1001    conda-forge
expat                     2.2.9                hb1e8313_2    conda-forge
ffmpeg                    4.3.1                hb787a4c_2    conda-forge
flake8                    3.8.4                      py_0  
fontconfig                2.13.1            h07ff6b0_1003    conda-forge
freetype                  2.10.4               h3f75d11_0    conda-forge
freetype-py               2.2.0              pyh9f0ad1d_0    conda-forge
future                    0.18.2           py36h79c6626_3    conda-forge
gettext                   0.19.8.1          h7937167_1005    conda-forge
gevent                    20.12.1          py36h20b66c6_0    conda-forge
gitdb                     4.0.5                      py_0    conda-forge
gitpython                 3.1.12             pyhd8ed1ab_0    conda-forge
glfw                      3.3.2                h0b31af3_1    conda-forge
glib                      2.66.4               h22858aa_1    conda-forge
gmp                       6.2.1                h2e338ed_0    conda-forge
gnutls                    3.6.13               h756fd2b_1    conda-forge
google-cloud-speech       2.11.0                   pypi_0    pypi
googleapis-common-protos  1.53.0                   pypi_0    pypi
graphite2                 1.3.13            h2e338ed_1001    conda-forge
greenlet                  0.4.17           py36h20b66c6_2    conda-forge
harfbuzz                  2.7.4                hf28d55f_0    conda-forge
hdf5                      1.10.6          nompi_hc5d9132_1114    conda-forge
icu                       68.1                 h74dc148_0    conda-forge
idna                      2.10               pyh9f0ad1d_0    conda-forge
imageio                   2.9.0                      py_0    conda-forge
imageio-ffmpeg            0.4.3              pyhd8ed1ab_0    conda-forge
imagesize                 1.2.0              pyhd3eb1b0_0  
importlib-metadata        2.0.0                      py_1  
importlib_metadata        2.0.0                         1  
intervaltree              3.1.0                      py_0  
ipykernel                 5.3.4            py36h5ca1d4c_0  
ipython                   7.16.1           py36h5ca1d4c_0  
ipython_genutils          0.2.0              pyhd3eb1b0_1  
isort                     5.7.0              pyhd3eb1b0_0  
jasper                    1.900.1           h636a363_1006    conda-forge
javascripthon             0.11                       py_0    conda-forge
jdcal                     1.4.1                      py_0    conda-forge
jedi                      0.18.0                   pypi_0    pypi
jinja2                    2.11.3             pyhd3eb1b0_0  
jpeg                      9d                   hbcb3906_0    conda-forge
json_tricks               3.15.5             pyhd8ed1ab_0    conda-forge
jsonschema                3.2.0                      py_2  
jupyter_client            6.1.7                      py_0  
jupyter_core              4.7.1            py36hecd8cb5_0  
jupyterlab_pygments       0.1.2                      py_0  
keyring                   22.0.1           py36hecd8cb5_0  
kiwisolver                1.3.1            py36h615c93b_1    conda-forge
krb5                      1.17.2               h60d9502_0    conda-forge
lame                      3.100             h35c211d_1001    conda-forge
lazy-object-proxy         1.5.2            py36h9ed2024_0  
lcms2                     2.11                 h11f7e16_1    conda-forge
libblas                   3.9.0                7_openblas    conda-forge
libcblas                  3.9.0                7_openblas    conda-forge
libclang                  11.0.0          default_h9e6edd0_2    conda-forge
libcurl                   7.71.1               h9bf37e3_8    conda-forge
libcxx                    11.0.0               h4c3b8ed_1    conda-forge
libedit                   3.1.20191231         h0678c8f_2    conda-forge
libev                     4.33                 haf1e3a3_1    conda-forge
libffi                    3.3                  h046ec9c_2    conda-forge
libflac                   1.3.3                h74dc148_1    conda-forge
libgfortran               5.0.0           9_3_0_h6c81a4c_16    conda-forge
libgfortran5              9.3.0               h6c81a4c_16    conda-forge
libglib                   2.66.4               h7424822_1    conda-forge
libiconv                  1.16                 haf1e3a3_0    conda-forge
liblapack                 3.9.0                7_openblas    conda-forge
liblapacke                3.9.0                7_openblas    conda-forge
libllvm11                 11.0.1               h223d4b2_0    conda-forge
libnghttp2                1.41.0               h7580e61_2    conda-forge
libogg                    1.3.4                h35c211d_1    conda-forge
libopenblas               0.3.12          openmp_h54245bb_1    conda-forge
libopencv                 4.5.0                    py36_3    conda-forge
libopus                   1.3.1                hc929b4f_1    conda-forge
libpng                    1.6.37               h7cec526_2    conda-forge
libpq                     12.3                 h7049927_3    conda-forge
libsndfile                1.0.30               h74dc148_1    conda-forge
libsodium                 1.0.18               hbcb3906_1    conda-forge
libspatialindex           1.9.3                h0a44026_0  
libssh2                   1.9.0                h8a08a2b_5    conda-forge
libtiff                   4.2.0                h355d032_0    conda-forge
libvorbis                 1.3.7                h4a8c4bd_0    conda-forge
libwebp-base              1.1.0                hbcb3906_3    conda-forge
libxml2                   2.9.10               h802ca4f_3    conda-forge
llvm-openmp               11.0.0               h73239a0_1    conda-forge
lz4-c                     1.9.3                h046ec9c_0    conda-forge
macropy3                  1.1.0b2                    py_0    conda-forge
markupsafe                1.1.1            py36h1de35cc_0  
matplotlib                3.3.3            py36h79c6626_0    conda-forge
matplotlib-base           3.3.3            py36h50af36e_0    conda-forge
mccabe                    0.6.1                    py36_1  
mistune                   0.8.4            py36h1de35cc_0  
mock                      4.0.3            py36h79c6626_1    conda-forge
moviepy                   1.0.1                      py_0    conda-forge
msgpack-numpy             0.4.7.1            pyh9f0ad1d_0    conda-forge
msgpack-python            1.0.2            py36h615c93b_1    conda-forge
mypy_extensions           0.4.3                    py36_0  
mysql-common              8.0.22               h694c41f_1    conda-forge
mysql-libs                8.0.22               hcb0700d_1    conda-forge
nbclient                  0.5.2              pyhd3eb1b0_0  
nbconvert                 6.0.7                    py36_0  
nbformat                  5.1.2              pyhd3eb1b0_1  
ncurses                   6.2                  h2e338ed_4    conda-forge
nest-asyncio              1.5.1              pyhd3eb1b0_0  
nettle                    3.6                  hedd7734_0    conda-forge
nspr                      4.29                 hbc8d48c_1    conda-forge
nss                       3.47                 hc0980d9_0    conda-forge
numexpr                   2.7.2            py36h2be6da3_0    conda-forge
numpy                     1.19.5           py36h08dc641_1    conda-forge
numpydoc                  1.1.0              pyhd3eb1b0_1  
olefile                   0.46               pyh9f0ad1d_1    conda-forge
opencv                    4.5.0                    py36_3    conda-forge
openh264                  2.1.1                hfd3ada9_0    conda-forge
openpyxl                  3.0.5                      py_0    conda-forge
openssl                   1.1.1j               h9ed2024_0  
packaging                 20.8                     pypi_0    pypi
pandas                    1.1.5            py36h2be6da3_0    conda-forge
pandoc                    2.11                 h0dc7051_0  
pandocfilters             1.4.3            py36hecd8cb5_1  
parso                     0.8.1                    pypi_0    pypi
pathlib2                  2.3.5            py36h79c6626_3    conda-forge
pathspec                  0.7.0                      py_0  
pcre                      8.44                 hb1e8313_0    conda-forge
pexpect                   4.8.0              pyhd3eb1b0_3  
pickleshare               0.7.5           pyhd3eb1b0_1003  
pillow                    8.1.0            py36hc04f27d_1    conda-forge
pip                       20.3.3             pyhd8ed1ab_0    conda-forge
pixman                    0.40.0               hbcb3906_0    conda-forge
pluggy                    0.13.1                   py36_0  
portaudio                 19.6.0               h647c56a_4  
proglog                   0.1.9                      py_0    conda-forge
prompt-toolkit            3.0.8                      py_0  
psutil                    5.8.0            py36h20b66c6_1    conda-forge
psychopy                  2021.2.3                  dev_0    <develop>
psychtoolbox              3.0.16                   pypi_0    pypi
pthread-stubs             0.4               hc929b4f_1001    conda-forge
ptyprocess                0.7.0              pyhd3eb1b0_2  
py-opencv                 4.5.0            py36h9cf137f_3    conda-forge
pycodestyle               2.6.0              pyhd3eb1b0_0  
pycparser                 2.20               pyh9f0ad1d_2    conda-forge
pydocstyle                5.1.1                      py_0  
pyflakes                  2.2.0              pyhd3eb1b0_0  
pygame                    2.0.1                    pypi_0    pypi
pyglet                    1.5.15                   pypi_0    pypi
pyglfw                    2.0.0            py36h79c6626_2    conda-forge
pygments                  2.7.4              pyhd3eb1b0_0  
pylint                    2.6.0                    py36_0  
pyls-black                0.4.6                hd3eb1b0_0  
pyls-spyder               0.3.0              pyhd3eb1b0_0  
pyo                       1.0.3                    pypi_0    pypi
pyobjc                    7.1                      pypi_0    pypi
pyobjc-core               7.1              py36h79c6626_0    conda-forge
pyobjc-framework-accounts 7.1                      pypi_0    pypi
pyobjc-framework-addressbook 7.1                      pypi_0    pypi
pyobjc-framework-adsupport 7.1                      pypi_0    pypi
pyobjc-framework-applescriptkit 7.1                      pypi_0    pypi
pyobjc-framework-applescriptobjc 7.1                      pypi_0    pypi
pyobjc-framework-applicationservices 7.1                      pypi_0    pypi
pyobjc-framework-authenticationservices 7.1                      pypi_0    pypi
pyobjc-framework-automaticassessmentconfiguration 7.1                      pypi_0    pypi
pyobjc-framework-automator 7.1                      pypi_0    pypi
pyobjc-framework-avfoundation 7.1                      pypi_0    pypi
pyobjc-framework-avkit    7.1                      pypi_0    pypi
pyobjc-framework-businesschat 7.1                      pypi_0    pypi
pyobjc-framework-calendarstore 7.1                      pypi_0    pypi
pyobjc-framework-cfnetwork 7.1                      pypi_0    pypi
pyobjc-framework-cloudkit 7.1                      pypi_0    pypi
pyobjc-framework-cocoa    7.1              py36h79c6626_0    conda-forge
pyobjc-framework-collaboration 7.1                      pypi_0    pypi
pyobjc-framework-colorsync 7.1                      pypi_0    pypi
pyobjc-framework-contacts 7.1                      pypi_0    pypi
pyobjc-framework-contactsui 7.1                      pypi_0    pypi
pyobjc-framework-coreaudio 7.1                      pypi_0    pypi
pyobjc-framework-coreaudiokit 7.1                      pypi_0    pypi
pyobjc-framework-corebluetooth 7.1                      pypi_0    pypi
pyobjc-framework-coredata 7.1                      pypi_0    pypi
pyobjc-framework-corehaptics 7.1                      pypi_0    pypi
pyobjc-framework-corelocation 7.1                      pypi_0    pypi
pyobjc-framework-coremedia 7.1                      pypi_0    pypi
pyobjc-framework-coremediaio 7.1                      pypi_0    pypi
pyobjc-framework-coremidi 7.1                      pypi_0    pypi
pyobjc-framework-coreml   7.1                      pypi_0    pypi
pyobjc-framework-coremotion 7.1                      pypi_0    pypi
pyobjc-framework-coreservices 7.1                      pypi_0    pypi
pyobjc-framework-corespotlight 7.1                      pypi_0    pypi
pyobjc-framework-coretext 7.1                      pypi_0    pypi
pyobjc-framework-corewlan 7.1                      pypi_0    pypi
pyobjc-framework-cryptotokenkit 7.1                      pypi_0    pypi
pyobjc-framework-devicecheck 7.1                      pypi_0    pypi
pyobjc-framework-dictionaryservices 7.1                      pypi_0    pypi
pyobjc-framework-discrecording 7.1                      pypi_0    pypi
pyobjc-framework-discrecordingui 7.1                      pypi_0    pypi
pyobjc-framework-diskarbitration 7.1                      pypi_0    pypi
pyobjc-framework-dvdplayback 7.1                      pypi_0    pypi
pyobjc-framework-eventkit 7.1                      pypi_0    pypi
pyobjc-framework-exceptionhandling 7.1                      pypi_0    pypi
pyobjc-framework-executionpolicy 7.1                      pypi_0    pypi
pyobjc-framework-externalaccessory 7.1                      pypi_0    pypi
pyobjc-framework-fileprovider 7.1                      pypi_0    pypi
pyobjc-framework-fileproviderui 7.1                      pypi_0    pypi
pyobjc-framework-findersync 7.1                      pypi_0    pypi
pyobjc-framework-fsevents 7.1                      pypi_0    pypi
pyobjc-framework-gamecenter 7.1                      pypi_0    pypi
pyobjc-framework-gamecontroller 7.1                      pypi_0    pypi
pyobjc-framework-gamekit  7.1                      pypi_0    pypi
pyobjc-framework-gameplaykit 7.1                      pypi_0    pypi
pyobjc-framework-imagecapturecore 7.1                      pypi_0    pypi
pyobjc-framework-imserviceplugin 7.1                      pypi_0    pypi
pyobjc-framework-inputmethodkit 7.1                      pypi_0    pypi
pyobjc-framework-installerplugins 7.1                      pypi_0    pypi
pyobjc-framework-instantmessage 7.1                      pypi_0    pypi
pyobjc-framework-intents  7.1                      pypi_0    pypi
pyobjc-framework-iosurface 7.1                      pypi_0    pypi
pyobjc-framework-ituneslibrary 7.1                      pypi_0    pypi
pyobjc-framework-latentsemanticmapping 7.1                      pypi_0    pypi
pyobjc-framework-launchservices 7.1                      pypi_0    pypi
pyobjc-framework-libdispatch 7.1                      pypi_0    pypi
pyobjc-framework-linkpresentation 7.1                      pypi_0    pypi
pyobjc-framework-localauthentication 7.1                      pypi_0    pypi
pyobjc-framework-mapkit   7.1                      pypi_0    pypi
pyobjc-framework-mediaaccessibility 7.1                      pypi_0    pypi
pyobjc-framework-medialibrary 7.1                      pypi_0    pypi
pyobjc-framework-mediaplayer 7.1                      pypi_0    pypi
pyobjc-framework-mediatoolbox 7.1                      pypi_0    pypi
pyobjc-framework-metal    7.1                      pypi_0    pypi
pyobjc-framework-metalkit 7.1                      pypi_0    pypi
pyobjc-framework-metalperformanceshaders 7.1                      pypi_0    pypi
pyobjc-framework-modelio  7.1                      pypi_0    pypi
pyobjc-framework-multipeerconnectivity 7.1                      pypi_0    pypi
pyobjc-framework-naturallanguage 7.1                      pypi_0    pypi
pyobjc-framework-netfs    7.1                      pypi_0    pypi
pyobjc-framework-network  7.1                      pypi_0    pypi
pyobjc-framework-networkextension 7.1                      pypi_0    pypi
pyobjc-framework-notificationcenter 7.1                      pypi_0    pypi
pyobjc-framework-opendirectory 7.1                      pypi_0    pypi
pyobjc-framework-osakit   7.1                      pypi_0    pypi
pyobjc-framework-oslog    7.1                      pypi_0    pypi
pyobjc-framework-pencilkit 7.1                      pypi_0    pypi
pyobjc-framework-photos   7.1                      pypi_0    pypi
pyobjc-framework-photosui 7.1                      pypi_0    pypi
pyobjc-framework-preferencepanes 7.1                      pypi_0    pypi
pyobjc-framework-pushkit  7.1                      pypi_0    pypi
pyobjc-framework-quartz   7.1                      pypi_0    pypi
pyobjc-framework-quicklookthumbnailing 7.1                      pypi_0    pypi
pyobjc-framework-safariservices 7.1                      pypi_0    pypi
pyobjc-framework-scenekit 7.1                      pypi_0    pypi
pyobjc-framework-screensaver 7.1                      pypi_0    pypi
pyobjc-framework-scriptingbridge 7.1                      pypi_0    pypi
pyobjc-framework-searchkit 7.1                      pypi_0    pypi
pyobjc-framework-security 7.1                      pypi_0    pypi
pyobjc-framework-securityfoundation 7.1                      pypi_0    pypi
pyobjc-framework-securityinterface 7.1                      pypi_0    pypi
pyobjc-framework-servicemanagement 7.1                      pypi_0    pypi
pyobjc-framework-social   7.1                      pypi_0    pypi
pyobjc-framework-soundanalysis 7.1                      pypi_0    pypi
pyobjc-framework-speech   7.1                      pypi_0    pypi
pyobjc-framework-spritekit 7.1                      pypi_0    pypi
pyobjc-framework-storekit 7.1                      pypi_0    pypi
pyobjc-framework-syncservices 7.1                      pypi_0    pypi
pyobjc-framework-systemconfiguration 7.1                      pypi_0    pypi
pyobjc-framework-systemextensions 7.1                      pypi_0    pypi
pyobjc-framework-usernotifications 7.1                      pypi_0    pypi
pyobjc-framework-videosubscriberaccount 7.1                      pypi_0    pypi
pyobjc-framework-videotoolbox 7.1                      pypi_0    pypi
pyobjc-framework-vision   7.1                      pypi_0    pypi
pyobjc-framework-webkit   7.1                      pypi_0    pypi
pyopengl                  3.1.5                      py_0    conda-forge
pyopenssl                 20.0.1             pyhd8ed1ab_0    conda-forge
pyosf                     1.0.5                      py_2    conda-forge
pyparallel                0.2.2                    pypi_0    pypi
pyparsing                 2.4.7              pyh9f0ad1d_0    conda-forge
pypubsub                  4.0.3                      py_0    conda-forge
pyqmix                    2019.1           py36h9f0ad1d_2    conda-forge
pyqt                      5.12.3           py36h79c6626_7    conda-forge
pyqt-impl                 5.12.3           py36hb40023b_7    conda-forge
pyqt5-sip                 4.19.18          py36h3ffa6ac_7    conda-forge
pyqtchart                 5.12             py36hb40023b_7    conda-forge
pyqtwebengine             5.12.1           py36hb40023b_7    conda-forge
pyrsistent                0.17.3           py36haf1e3a3_0  
pyserial                  3.5                pyhd8ed1ab_0    conda-forge
pysocks                   1.7.1            py36h79c6626_3    conda-forge
pysoundfile               0.10.3.post1       pyhd3deb0d_0    conda-forge
pytables                  3.6.1            py36h256c1cb_3    conda-forge
python                    3.6.12          h6c3b2c9_0_cpython    conda-forge
python-bidi               0.4.2                      py_0    conda-forge
python-dateutil           2.8.1                      py_0    conda-forge
python-freetype           0.6                      pypi_0    pypi
python-gitlab             2.5.0                      py_0    conda-forge
python-jsonrpc-server     0.4.0                      py_0  
python-language-server    0.36.2             pyhd3eb1b0_0  
python-sounddevice        0.4.1              pyh9f0ad1d_0    conda-forge
python-vlc                3.0.11115                pypi_0    pypi
python.app                1.3              py36h20b66c6_4    conda-forge
python_abi                3.6                     1_cp36m    conda-forge
pytz                      2020.5             pyhd8ed1ab_0    conda-forge
pyyaml                    5.3.1            py36h20b66c6_2    conda-forge
pyzmq                     20.0.0           py36h6ad5393_1    conda-forge
qdarkstyle                2.8.1                      py_0  
qt                        5.12.9               h126340a_2    conda-forge
qtawesome                 1.0.1                      py_0  
qtconsole                 5.0.2              pyhd3eb1b0_0  
qtpy                      1.9.0                      py_0  
questplus                 2019.4                     py_0    conda-forge
readline                  8.0                  h0678c8f_2    conda-forge
regex                     2020.11.13       py36h9ed2024_0  
requests                  2.25.1             pyhd3deb0d_0    conda-forge
rope                      0.18.0                     py_0  
rtree                     0.9.4                    py36_1  
ruamel.yaml               0.16.12          py36h20b66c6_2    conda-forge
ruamel.yaml.clib          0.2.2            py36h20b66c6_2    conda-forge
scipy                     1.5.3            py36h04de62b_0    conda-forge
setuptools                49.6.0           py36h79c6626_3    conda-forge
six                       1.15.0             pyh9f0ad1d_0    conda-forge
smmap                     3.0.4              pyh9f0ad1d_0    conda-forge
snowballstemmer           2.1.0              pyhd3eb1b0_0  
sortedcontainers          2.3.0              pyhd3eb1b0_0  
sphinx                    3.4.3              pyhd3eb1b0_0  
sphinxcontrib-applehelp   1.0.2              pyhd3eb1b0_0  
sphinxcontrib-devhelp     1.0.2              pyhd3eb1b0_0  
sphinxcontrib-htmlhelp    1.0.3              pyhd3eb1b0_0  
sphinxcontrib-jsmath      1.0.1              pyhd3eb1b0_0  
sphinxcontrib-qthelp      1.0.3              pyhd3eb1b0_0  
sphinxcontrib-serializinghtml 1.1.4              pyhd3eb1b0_0  
spyder                    4.2.1            py36hecd8cb5_1  
spyder-kernels            1.10.1           py36hecd8cb5_0  
sqlite                    3.34.0               h17101e1_0    conda-forge
sr-research-pylink        2.1.1.0                  pypi_0    pypi
testpath                  0.4.4              pyhd3eb1b0_0  
textdistance              4.2.1              pyhd3eb1b0_0  
three-merge               0.1.1              pyhd3eb1b0_0  
tk                        8.6.10               h0419947_1    conda-forge
tobii-research            1.8.0                    pypi_0    pypi
toml                      0.10.1                     py_0  
tornado                   6.1              py36h20b66c6_1    conda-forge
tqdm                      4.56.0             pyhd8ed1ab_0    conda-forge
traitlets                 4.3.3                    py36_0  
typed-ast                 1.4.2            py36h9ed2024_1  
typing_extensions         3.7.4.3            pyha847dfd_0  
ujson                     4.0.2            py36h23ab428_0  
urllib3                   1.26.2             pyhd8ed1ab_0    conda-forge
watchdog                  1.0.2            py36h9ed2024_1  
wcwidth                   0.2.5                      py_0  
webassets                 2.0                        py_0    conda-forge
webencodings              0.5.1                    py36_1  
websocket-client          0.57.0           py36h79c6626_4    conda-forge
wheel                     0.36.2             pyhd3deb0d_0    conda-forge
wrapt                     1.12.1           py36h1de35cc_1  
wurlitzer                 2.0.1                    py36_0  
wxpython                  4.0.6            py36h1cd7e00_1    conda-forge
x264                      1!161.3030           h35c211d_0    conda-forge
xarray                    0.16.2             pyhd8ed1ab_0    conda-forge
xlrd                      2.0.1              pyhd8ed1ab_3    conda-forge
xz                        5.2.5                haf1e3a3_1    conda-forge
yaml                      0.2.5                haf1e3a3_0    conda-forge
yapf                      0.30.0                     py_0  
zeromq                    4.3.3                h74dc148_3    conda-forge
zipp                      3.4.0              pyhd3eb1b0_0  
zlib                      1.2.11            h7795811_1010    conda-forge
zope.event                4.5.0              pyh9f0ad1d_0    conda-forge
zope.interface            5.2.0            py36h20b66c6_1    conda-forge
zstd                      1.4.8                hf387650_1    conda-forge

Thanks again

Hey @sol ,

This actually does work for both the keyboard demo and my own script (albeit not tested with eyetracking).

It hangs for about 30 seconds. It’s also worth mentioning that earlier in the week I was struggling with Anaconda (trying to install psychopy would cause conda to solve the environment indefinitely). I discovered that my PYTHONPATH was being automatically set to some other python 2.7 distribution in the lab’s drive, so I modified my bash_profile to reset it via PYTHONPATH='', and conda has been working normally for me since then. Do you think that could be related, or that maybe there’s some other issue with the way our lab’s configuration or permissions is setup?

Hi @jeffkravitz,

Well this is one piece of good news. :wink:

Anything is possible at this point. I think a dependancy difference could also be at fault. Looking over the dependencies again, it looks like I’m using pyobjc v 7.1. The first anaconda env you were using had pyobjc 6.2.2, which was not causing a seg fault, but was erroring because of a bug in the psychopy version being used. Your second anaconda env, which is segfaulting when trying to start iohub, is using pyobjc v 7.3.

pyobjc is only used on macOS, so if it is causing a seg fault that would explain why you are having trouble starting iohub in the macOS anaconda env. but it is fine on Windows.

Maybe try downgrading to pyobjc 7.1 and see if that fixes the issue. If you do try this, can you let me know the outcome please?

If that does not work, it might be best to just use the macOS standalone version for now. If importing pylink fails for you when using the standalone, you might be able to fix that by manually copying the pylink folder from your python 3.6 anaconda env into the PsychoPy App bundle contents.

Thanks for working through this with us

Hi @sol , no problem, thank you for helping me out, I appreciate it a lot!

Just to note, I actually haven’t tested the iokeyboard method on PC at all - I’ve only been testing on Mac throughout this process.

I downgraded to pyobjc=7.1, and it works! However, it looks like there are certain psychopy conflicts that occurred during the downgrade:

(ioWait_new_test) [ jeff @ ultron ~ ] pip install pyobjc==7.1
Collecting pyobjc==7.1
  Using cached pyobjc-7.1-py3-none-any.whl (3.0 kB)
Collecting pyobjc-framework-PhotosUI==7.1
  Using cached pyobjc_framework_PhotosUI-7.1-cp36-abi3-macosx_10_9_x86_64.whl (7.9 kB)
Collecting pyobjc-framework-InstantMessage==7.1
  Using cached pyobjc_framework_InstantMessage-7.1-py2.py3-none-any.whl (4.9 kB)
Collecting pyobjc-framework-iTunesLibrary==7.1
  Using cached pyobjc_framework_iTunesLibrary-7.1-py2.py3-none-any.whl (4.5 kB)
Collecting pyobjc-framework-ScriptingBridge==7.1
  Using cached pyobjc_framework_ScriptingBridge-7.1-cp36-abi3-macosx_10_9_x86_64.whl (6.8 kB)
Collecting pyobjc-framework-CoreData==7.1
  Using cached pyobjc_framework_CoreData-7.1-cp36-abi3-macosx_10_9_x86_64.whl (12 kB)
Collecting pyobjc-framework-ScreenSaver==7.1
  Using cached pyobjc_framework_ScreenSaver-7.1-cp36-abi3-macosx_10_9_x86_64.whl (6.2 kB)
Collecting pyobjc-framework-CoreSpotlight==7.1
  Using cached pyobjc_framework_CoreSpotlight-7.1-cp36-abi3-macosx_10_9_x86_64.whl (7.1 kB)
Collecting pyobjc-core==7.1
  Using cached pyobjc_core-7.1-cp36-cp36m-macosx_10_9_x86_64.whl (291 kB)
Collecting pyobjc-framework-ImageCaptureCore==7.1
  Using cached pyobjc_framework_ImageCaptureCore-7.1-cp36-abi3-macosx_10_9_x86_64.whl (12 kB)
Collecting pyobjc-framework-SyncServices==7.1
  Using cached pyobjc_framework_SyncServices-7.1-cp36-abi3-macosx_10_9_x86_64.whl (10 kB)
Collecting pyobjc-framework-Vision==7.1
  Using cached pyobjc_framework_Vision-7.1-cp36-abi3-macosx_10_9_x86_64.whl (9.3 kB)
Collecting pyobjc-framework-InputMethodKit==7.1
  Using cached pyobjc_framework_InputMethodKit-7.1-cp36-abi3-macosx_10_9_x86_64.whl (7.6 kB)
Collecting pyobjc-framework-OSAKit==7.1
  Using cached pyobjc_framework_OSAKit-7.1-py2.py3-none-any.whl (3.5 kB)
Collecting pyobjc-framework-AppleScriptObjC==7.1
  Using cached pyobjc_framework_AppleScriptObjC-7.1-py2.py3-none-any.whl (3.9 kB)
Collecting pyobjc-framework-NetFS==7.1
  Using cached pyobjc_framework_NetFS-7.1-py2.py3-none-any.whl (3.7 kB)
Collecting pyobjc-framework-BusinessChat==7.1
  Using cached pyobjc_framework_BusinessChat-7.1-py2.py3-none-any.whl (2.9 kB)
Collecting pyobjc-framework-VideoSubscriberAccount==7.1
  Using cached pyobjc_framework_VideoSubscriberAccount-7.1-py2.py3-none-any.whl (3.7 kB)
Collecting pyobjc-framework-ContactsUI==7.1
  Using cached pyobjc_framework_ContactsUI-7.1-cp36-abi3-macosx_10_9_x86_64.whl (6.0 kB)
Collecting pyobjc-framework-IMServicePlugIn==7.1
  Using cached pyobjc_framework_IMServicePlugIn-7.1-cp36-abi3-macosx_10_9_x86_64.whl (9.7 kB)
Collecting pyobjc-framework-DVDPlayback==7.1
  Using cached pyobjc_framework_DVDPlayback-7.1-py2.py3-none-any.whl (7.6 kB)
Collecting pyobjc-framework-Cocoa==7.1
  Using cached pyobjc_framework_Cocoa-7.1-cp36-cp36m-macosx_10_9_x86_64.whl (260 kB)
Collecting pyobjc-framework-EventKit==7.1
  Using cached pyobjc_framework_EventKit-7.1-py2.py3-none-any.whl (5.6 kB)
Collecting pyobjc-framework-SecurityInterface==7.1
  Using cached pyobjc_framework_SecurityInterface-7.1-cp36-abi3-macosx_10_9_x86_64.whl (7.8 kB)
Collecting pyobjc-framework-AVFoundation==7.1
  Using cached pyobjc_framework_AVFoundation-7.1-cp36-abi3-macosx_10_9_x86_64.whl (37 kB)
Collecting pyobjc-framework-CryptoTokenKit==7.1
  Using cached pyobjc_framework_CryptoTokenKit-7.1-cp36-abi3-macosx_10_9_x86_64.whl (9.4 kB)
Collecting pyobjc-framework-DiskArbitration==7.1
  Using cached pyobjc_framework_DiskArbitration-7.1-py2.py3-none-any.whl (4.3 kB)
Collecting pyobjc-framework-SearchKit==7.1
  Using cached pyobjc_framework_SearchKit-7.1-py2.py3-none-any.whl (3.3 kB)
Collecting pyobjc-framework-PreferencePanes==7.1
  Using cached pyobjc_framework_PreferencePanes-7.1-py2.py3-none-any.whl (4.2 kB)
Collecting pyobjc-framework-Metal==7.1
  Using cached pyobjc_framework_Metal-7.1-cp36-abi3-macosx_10_9_x86_64.whl (26 kB)
Collecting pyobjc-framework-LocalAuthentication==7.1
  Using cached pyobjc_framework_LocalAuthentication-7.1-py2.py3-none-any.whl (4.8 kB)
Collecting pyobjc-framework-LaunchServices==7.1
  Using cached pyobjc_framework_LaunchServices-7.1-py2.py3-none-any.whl (3.3 kB)
Collecting pyobjc-framework-SafariServices==7.1
  Using cached pyobjc_framework_SafariServices-7.1-cp36-abi3-macosx_10_9_x86_64.whl (6.0 kB)
Collecting pyobjc-framework-CoreWLAN==7.1
  Using cached pyobjc_framework_CoreWLAN-7.1-cp36-abi3-macosx_10_9_x86_64.whl (8.3 kB)
Collecting pyobjc-framework-Intents==7.1
  Using cached pyobjc_framework_Intents-7.1-cp36-abi3-macosx_10_9_x86_64.whl (19 kB)
Collecting pyobjc-framework-AdSupport==7.1
  Using cached pyobjc_framework_AdSupport-7.1-py2.py3-none-any.whl (2.9 kB)
Collecting pyobjc-framework-CoreMediaIO==7.1
  Using cached pyobjc_framework_CoreMediaIO-7.1-cp36-abi3-macosx_10_9_x86_64.whl (10 kB)
Collecting pyobjc-framework-Collaboration==7.1
  Using cached pyobjc_framework_Collaboration-7.1-py2.py3-none-any.whl (4.3 kB)
Collecting pyobjc-framework-AVKit==7.1
  Using cached pyobjc_framework_AVKit-7.1-cp36-abi3-macosx_10_9_x86_64.whl (7.4 kB)
Collecting pyobjc-framework-CoreMIDI==7.1
  Using cached pyobjc_framework_CoreMIDI-7.1-cp36-abi3-macosx_10_9_x86_64.whl (9.0 kB)
Collecting pyobjc-framework-ColorSync==7.1
  Using cached pyobjc_framework_ColorSync-7.1-py2.py3-none-any.whl (5.1 kB)
Collecting pyobjc-framework-Photos==7.1
  Using cached pyobjc_framework_Photos-7.1-cp36-abi3-macosx_10_9_x86_64.whl (9.1 kB)
Collecting pyobjc-framework-libdispatch==7.1
  Using cached pyobjc_framework_libdispatch-7.1-cp36-cp36m-macosx_10_9_x86_64.whl (12 kB)
Collecting pyobjc-framework-StoreKit==7.1
  Using cached pyobjc_framework_StoreKit-7.1-cp36-abi3-macosx_10_9_x86_64.whl (8.5 kB)
Collecting pyobjc-framework-CoreLocation==7.1
  Using cached pyobjc_framework_CoreLocation-7.1-cp36-abi3-macosx_10_9_x86_64.whl (9.0 kB)
Collecting pyobjc-framework-Quartz==7.1
  Using cached pyobjc_framework_Quartz-7.1-cp36-cp36m-macosx_10_9_x86_64.whl (140 kB)
Collecting pyobjc-framework-MetalPerformanceShaders==7.1
  Using cached pyobjc_framework_MetalPerformanceShaders-7.1-cp36-abi3-macosx_10_9_x86_64.whl (16 kB)
Collecting pyobjc-framework-MediaPlayer==7.1
  Using cached pyobjc_framework_MediaPlayer-7.1-py2.py3-none-any.whl (5.7 kB)
Collecting pyobjc-framework-Contacts==7.1
  Using cached pyobjc_framework_Contacts-7.1-cp36-abi3-macosx_10_9_x86_64.whl (9.3 kB)
Collecting pyobjc-framework-ApplicationServices==7.1
  Using cached pyobjc_framework_ApplicationServices-7.1-py2.py3-none-any.whl (19 kB)
Collecting pyobjc-framework-AddressBook==7.1
  Using cached pyobjc_framework_AddressBook-7.1-cp36-abi3-macosx_10_9_x86_64.whl (10 kB)
Collecting pyobjc-framework-MetalKit==7.1
  Using cached pyobjc_framework_MetalKit-7.1-cp36-abi3-macosx_10_9_x86_64.whl (6.6 kB)
Collecting pyobjc-framework-CoreML==7.1
  Using cached pyobjc_framework_CoreML-7.1-cp36-abi3-macosx_10_9_x86_64.whl (8.1 kB)
Collecting pyobjc-framework-CoreAudioKit==7.1
  Using cached pyobjc_framework_CoreAudioKit-7.1-cp36-abi3-macosx_10_9_x86_64.whl (5.7 kB)
Collecting pyobjc-framework-IOSurface==7.1
  Using cached pyobjc_framework_IOSurface-7.1-py2.py3-none-any.whl (4.3 kB)
Collecting pyobjc-framework-SpriteKit==7.1
  Using cached pyobjc_framework_SpriteKit-7.1-cp36-abi3-macosx_10_9_x86_64.whl (11 kB)
Collecting pyobjc-framework-CFNetwork==7.1
  Using cached pyobjc_framework_CFNetwork-7.1-cp36-abi3-macosx_10_9_x86_64.whl (12 kB)
Collecting pyobjc-framework-SystemConfiguration==7.1
  Using cached pyobjc_framework_SystemConfiguration-7.1-cp36-abi3-macosx_10_9_x86_64.whl (17 kB)
Collecting pyobjc-framework-CoreServices==7.1
  Using cached pyobjc_framework_CoreServices-7.1-cp36-abi3-macosx_10_9_x86_64.whl (27 kB)
Collecting pyobjc-framework-SceneKit==7.1
  Using cached pyobjc_framework_SceneKit-7.1-cp36-abi3-macosx_10_9_x86_64.whl (21 kB)
Collecting pyobjc-framework-Social==7.1
  Using cached pyobjc_framework_Social-7.1-py2.py3-none-any.whl (3.9 kB)
Collecting pyobjc-framework-CoreText==7.1
  Using cached pyobjc_framework_CoreText-7.1-cp36-cp36m-macosx_10_9_x86_64.whl (23 kB)
Collecting pyobjc-framework-ModelIO==7.1
  Using cached pyobjc_framework_ModelIO-7.1-cp36-abi3-macosx_10_9_x86_64.whl (13 kB)
Collecting pyobjc-framework-Security==7.1
  Using cached pyobjc_framework_Security-7.1-cp36-cp36m-macosx_10_9_x86_64.whl (29 kB)
Collecting pyobjc-framework-GameCenter==7.1
  Using cached pyobjc_framework_GameCenter-7.1-cp36-abi3-macosx_10_9_x86_64.whl (12 kB)
Collecting pyobjc-framework-FSEvents==7.1
  Using cached pyobjc_framework_FSEvents-7.1-cp36-abi3-macosx_10_9_x86_64.whl (9.1 kB)
Collecting pyobjc-framework-MediaAccessibility==7.1
  Using cached pyobjc_framework_MediaAccessibility-7.1-py2.py3-none-any.whl (3.8 kB)
Collecting pyobjc-framework-GameController==7.1
  Using cached pyobjc_framework_GameController-7.1-cp36-abi3-macosx_10_9_x86_64.whl (8.2 kB)
Collecting pyobjc-framework-LatentSemanticMapping==7.1
  Using cached pyobjc_framework_LatentSemanticMapping-7.1-py2.py3-none-any.whl (4.9 kB)
Collecting pyobjc-framework-NetworkExtension==7.1
  Using cached pyobjc_framework_NetworkExtension-7.1-cp36-abi3-macosx_10_9_x86_64.whl (10 kB)
Collecting pyobjc-framework-InstallerPlugins==7.1
  Using cached pyobjc_framework_InstallerPlugins-7.1-py2.py3-none-any.whl (4.3 kB)
Collecting pyobjc-framework-Automator==7.1
  Using cached pyobjc_framework_Automator-7.1-py2.py3-none-any.whl (4.9 kB)
Collecting pyobjc-framework-CoreBluetooth==7.1
  Using cached pyobjc_framework_CoreBluetooth-7.1-cp36-abi3-macosx_10_9_x86_64.whl (9.8 kB)
Collecting pyobjc-framework-UserNotifications==7.1
  Using cached pyobjc_framework_UserNotifications-7.1-cp36-abi3-macosx_10_9_x86_64.whl (7.1 kB)
Collecting pyobjc-framework-CloudKit==7.1
  Using cached pyobjc_framework_CloudKit-7.1-py2.py3-none-any.whl (7.2 kB)
Collecting pyobjc-framework-AppleScriptKit==7.1
  Using cached pyobjc_framework_AppleScriptKit-7.1-py2.py3-none-any.whl (3.8 kB)
Collecting pyobjc-framework-ServiceManagement==7.1
  Using cached pyobjc_framework_ServiceManagement-7.1-py2.py3-none-any.whl (4.4 kB)
Collecting pyobjc-framework-Accounts==7.1
  Using cached pyobjc_framework_Accounts-7.1-py2.py3-none-any.whl (4.5 kB)
Collecting pyobjc-framework-MediaToolbox==7.1
  Using cached pyobjc_framework_MediaToolbox-7.1-cp36-abi3-macosx_10_9_x86_64.whl (8.4 kB)
Collecting pyobjc-framework-MediaLibrary==7.1
  Using cached pyobjc_framework_MediaLibrary-7.1-py2.py3-none-any.whl (3.8 kB)
Collecting pyobjc-framework-DictionaryServices==7.1
  Using cached pyobjc_framework_DictionaryServices-7.1-py2.py3-none-any.whl (3.4 kB)
Collecting pyobjc-framework-GameplayKit==7.1
  Using cached pyobjc_framework_GameplayKit-7.1-cp36-abi3-macosx_10_9_x86_64.whl (8.6 kB)
Collecting pyobjc-framework-MultipeerConnectivity==7.1
  Using cached pyobjc_framework_MultipeerConnectivity-7.1-cp36-abi3-macosx_10_9_x86_64.whl (9.0 kB)
Collecting pyobjc-framework-VideoToolbox==7.1
  Using cached pyobjc_framework_VideoToolbox-7.1-cp36-abi3-macosx_10_9_x86_64.whl (9.3 kB)
Collecting pyobjc-framework-OpenDirectory==7.1
  Using cached pyobjc_framework_OpenDirectory-7.1-py2.py3-none-any.whl (11 kB)
Collecting pyobjc-framework-NotificationCenter==7.1
  Using cached pyobjc_framework_NotificationCenter-7.1-cp36-abi3-macosx_10_9_x86_64.whl (7.4 kB)
Collecting pyobjc-framework-NaturalLanguage==7.1
  Using cached pyobjc_framework_NaturalLanguage-7.1-py2.py3-none-any.whl (4.2 kB)
Collecting pyobjc-framework-CoreAudio==7.1
  Using cached pyobjc_framework_CoreAudio-7.1-cp36-cp36m-macosx_10_9_x86_64.whl (24 kB)
Collecting pyobjc-framework-WebKit==7.1
  Using cached pyobjc_framework_WebKit-7.1-cp36-abi3-macosx_10_9_x86_64.whl (26 kB)
Collecting pyobjc-framework-SecurityFoundation==7.1
  Using cached pyobjc_framework_SecurityFoundation-7.1-py2.py3-none-any.whl (3.1 kB)
Collecting pyobjc-framework-ExceptionHandling==7.1
  Using cached pyobjc_framework_ExceptionHandling-7.1-py2.py3-none-any.whl (7.3 kB)
Collecting pyobjc-framework-ExternalAccessory==7.1
  Using cached pyobjc_framework_ExternalAccessory-7.1-cp36-abi3-macosx_10_9_x86_64.whl (6.7 kB)
Collecting pyobjc-framework-CoreMedia==7.1
  Using cached pyobjc_framework_CoreMedia-7.1-cp36-cp36m-macosx_10_9_x86_64.whl (18 kB)
Collecting pyobjc-framework-CalendarStore==7.1
  Using cached pyobjc_framework_CalendarStore-7.1-py2.py3-none-any.whl (4.5 kB)
Collecting pyobjc-framework-FinderSync==7.1
  Using cached pyobjc_framework_FinderSync-7.1-py2.py3-none-any.whl (4.3 kB)
Collecting pyobjc-framework-GameKit==7.1
  Using cached pyobjc_framework_GameKit-7.1-cp36-abi3-macosx_10_9_x86_64.whl (14 kB)
Collecting pyobjc-framework-Network==7.1
  Using cached pyobjc_framework_Network-7.1-cp36-abi3-macosx_10_9_x86_64.whl (13 kB)
Collecting pyobjc-framework-MapKit==7.1
  Using cached pyobjc_framework_MapKit-7.1-cp36-abi3-macosx_10_9_x86_64.whl (14 kB)
Collecting pyobjc-framework-DiscRecordingUI==7.1
  Using cached pyobjc_framework_DiscRecordingUI-7.1-py2.py3-none-any.whl (4.2 kB)
Collecting pyobjc-framework-DiscRecording==7.1
  Using cached pyobjc_framework_DiscRecording-7.1-cp36-abi3-macosx_10_9_x86_64.whl (12 kB)
Installing collected packages: pyobjc-core, pyobjc-framework-Cocoa, pyobjc-framework-Quartz, pyobjc-framework-FSEvents, pyobjc-framework-CoreMedia, pyobjc-framework-SpriteKit, pyobjc-framework-Security, pyobjc-framework-Metal, pyobjc-framework-DiscRecording, pyobjc-framework-CoreServices, pyobjc-framework-CoreML, pyobjc-framework-CoreLocation, pyobjc-framework-CoreData, pyobjc-framework-CoreAudio, pyobjc-framework-Contacts, pyobjc-framework-AVFoundation, pyobjc-framework-Accounts, pyobjc-framework-WebKit, pyobjc-framework-Vision, pyobjc-framework-VideoToolbox, pyobjc-framework-VideoSubscriberAccount, pyobjc-framework-UserNotifications, pyobjc-framework-SystemConfiguration, pyobjc-framework-SyncServices, pyobjc-framework-StoreKit, pyobjc-framework-Social, pyobjc-framework-ServiceManagement, pyobjc-framework-SecurityInterface, pyobjc-framework-SecurityFoundation, pyobjc-framework-SearchKit, pyobjc-framework-ScriptingBridge, pyobjc-framework-ScreenSaver, pyobjc-framework-SceneKit, pyobjc-framework-SafariServices, pyobjc-framework-PreferencePanes, pyobjc-framework-PhotosUI, pyobjc-framework-Photos, pyobjc-framework-OSAKit, pyobjc-framework-OpenDirectory, pyobjc-framework-NotificationCenter, pyobjc-framework-NetworkExtension, pyobjc-framework-Network, pyobjc-framework-NetFS, pyobjc-framework-NaturalLanguage, pyobjc-framework-MultipeerConnectivity, pyobjc-framework-ModelIO, pyobjc-framework-MetalPerformanceShaders, pyobjc-framework-MetalKit, pyobjc-framework-MediaToolbox, pyobjc-framework-MediaPlayer, pyobjc-framework-MediaLibrary, pyobjc-framework-MediaAccessibility, pyobjc-framework-MapKit, pyobjc-framework-LocalAuthentication, pyobjc-framework-libdispatch, pyobjc-framework-LaunchServices, pyobjc-framework-LatentSemanticMapping, pyobjc-framework-iTunesLibrary, pyobjc-framework-IOSurface, pyobjc-framework-Intents, pyobjc-framework-InstantMessage, pyobjc-framework-InstallerPlugins, pyobjc-framework-InputMethodKit, pyobjc-framework-IMServicePlugIn, pyobjc-framework-ImageCaptureCore, pyobjc-framework-GameplayKit, pyobjc-framework-GameKit, pyobjc-framework-GameController, pyobjc-framework-GameCenter, pyobjc-framework-FinderSync, pyobjc-framework-ExternalAccessory, pyobjc-framework-ExceptionHandling, pyobjc-framework-EventKit, pyobjc-framework-DVDPlayback, pyobjc-framework-DiskArbitration, pyobjc-framework-DiscRecordingUI, pyobjc-framework-DictionaryServices, pyobjc-framework-CryptoTokenKit, pyobjc-framework-CoreWLAN, pyobjc-framework-CoreText, pyobjc-framework-CoreSpotlight, pyobjc-framework-CoreMIDI, pyobjc-framework-CoreMediaIO, pyobjc-framework-CoreBluetooth, pyobjc-framework-CoreAudioKit, pyobjc-framework-ContactsUI, pyobjc-framework-ColorSync, pyobjc-framework-Collaboration, pyobjc-framework-CloudKit, pyobjc-framework-CFNetwork, pyobjc-framework-CalendarStore, pyobjc-framework-BusinessChat, pyobjc-framework-AVKit, pyobjc-framework-Automator, pyobjc-framework-ApplicationServices, pyobjc-framework-AppleScriptObjC, pyobjc-framework-AppleScriptKit, pyobjc-framework-AdSupport, pyobjc-framework-AddressBook, pyobjc
  Attempting uninstall: pyobjc-core
    Found existing installation: pyobjc-core 7.3
    Uninstalling pyobjc-core-7.3:
      Successfully uninstalled pyobjc-core-7.3
  Attempting uninstall: pyobjc-framework-Cocoa
    Found existing installation: pyobjc-framework-Cocoa 7.3
    Uninstalling pyobjc-framework-Cocoa-7.3:
      Successfully uninstalled pyobjc-framework-Cocoa-7.3
  Attempting uninstall: pyobjc-framework-Quartz
    Found existing installation: pyobjc-framework-Quartz 7.3
    Uninstalling pyobjc-framework-Quartz-7.3:
      Successfully uninstalled pyobjc-framework-Quartz-7.3
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
psychopy 2021.2.3 requires jedi>=0.16, which is not installed.
psychopy 2021.2.3 requires python-vlc>=3.0.12118; platform_system != "Windows", which is not installed.
psychopy 2021.2.3 requires tobii-research; python_version <= "3.6", which is not installed.
psychopy 2021.2.3 requires ujson, which is not installed.
Successfully installed pyobjc-7.1 pyobjc-core-7.1 pyobjc-framework-AVFoundation-7.1 pyobjc-framework-AVKit-7.1 pyobjc-framework-Accounts-7.1 pyobjc-framework-AdSupport-7.1 pyobjc-framework-AddressBook-7.1 pyobjc-framework-AppleScriptKit-7.1 pyobjc-framework-AppleScriptObjC-7.1 pyobjc-framework-ApplicationServices-7.1 pyobjc-framework-Automator-7.1 pyobjc-framework-BusinessChat-7.1 pyobjc-framework-CFNetwork-7.1 pyobjc-framework-CalendarStore-7.1 pyobjc-framework-CloudKit-7.1 pyobjc-framework-Cocoa-7.1 pyobjc-framework-Collaboration-7.1 pyobjc-framework-ColorSync-7.1 pyobjc-framework-Contacts-7.1 pyobjc-framework-ContactsUI-7.1 pyobjc-framework-CoreAudio-7.1 pyobjc-framework-CoreAudioKit-7.1 pyobjc-framework-CoreBluetooth-7.1 pyobjc-framework-CoreData-7.1 pyobjc-framework-CoreLocation-7.1 pyobjc-framework-CoreMIDI-7.1 pyobjc-framework-CoreML-7.1 pyobjc-framework-CoreMedia-7.1 pyobjc-framework-CoreMediaIO-7.1 pyobjc-framework-CoreServices-7.1 pyobjc-framework-CoreSpotlight-7.1 pyobjc-framework-CoreText-7.1 pyobjc-framework-CoreWLAN-7.1 pyobjc-framework-CryptoTokenKit-7.1 pyobjc-framework-DVDPlayback-7.1 pyobjc-framework-DictionaryServices-7.1 pyobjc-framework-DiscRecording-7.1 pyobjc-framework-DiscRecordingUI-7.1 pyobjc-framework-DiskArbitration-7.1 pyobjc-framework-EventKit-7.1 pyobjc-framework-ExceptionHandling-7.1 pyobjc-framework-ExternalAccessory-7.1 pyobjc-framework-FSEvents-7.1 pyobjc-framework-FinderSync-7.1 pyobjc-framework-GameCenter-7.1 pyobjc-framework-GameController-7.1 pyobjc-framework-GameKit-7.1 pyobjc-framework-GameplayKit-7.1 pyobjc-framework-IMServicePlugIn-7.1 pyobjc-framework-IOSurface-7.1 pyobjc-framework-ImageCaptureCore-7.1 pyobjc-framework-InputMethodKit-7.1 pyobjc-framework-InstallerPlugins-7.1 pyobjc-framework-InstantMessage-7.1 pyobjc-framework-Intents-7.1 pyobjc-framework-LatentSemanticMapping-7.1 pyobjc-framework-LaunchServices-7.1 pyobjc-framework-LocalAuthentication-7.1 pyobjc-framework-MapKit-7.1 pyobjc-framework-MediaAccessibility-7.1 pyobjc-framework-MediaLibrary-7.1 pyobjc-framework-MediaPlayer-7.1 pyobjc-framework-MediaToolbox-7.1 pyobjc-framework-Metal-7.1 pyobjc-framework-MetalKit-7.1 pyobjc-framework-MetalPerformanceShaders-7.1 pyobjc-framework-ModelIO-7.1 pyobjc-framework-MultipeerConnectivity-7.1 pyobjc-framework-NaturalLanguage-7.1 pyobjc-framework-NetFS-7.1 pyobjc-framework-Network-7.1 pyobjc-framework-NetworkExtension-7.1 pyobjc-framework-NotificationCenter-7.1 pyobjc-framework-OSAKit-7.1 pyobjc-framework-OpenDirectory-7.1 pyobjc-framework-Photos-7.1 pyobjc-framework-PhotosUI-7.1 pyobjc-framework-PreferencePanes-7.1 pyobjc-framework-Quartz-7.1 pyobjc-framework-SafariServices-7.1 pyobjc-framework-SceneKit-7.1 pyobjc-framework-ScreenSaver-7.1 pyobjc-framework-ScriptingBridge-7.1 pyobjc-framework-SearchKit-7.1 pyobjc-framework-Security-7.1 pyobjc-framework-SecurityFoundation-7.1 pyobjc-framework-SecurityInterface-7.1 pyobjc-framework-ServiceManagement-7.1 pyobjc-framework-Social-7.1 pyobjc-framework-SpriteKit-7.1 pyobjc-framework-StoreKit-7.1 pyobjc-framework-SyncServices-7.1 pyobjc-framework-SystemConfiguration-7.1 pyobjc-framework-UserNotifications-7.1 pyobjc-framework-VideoSubscriberAccount-7.1 pyobjc-framework-VideoToolbox-7.1 pyobjc-framework-Vision-7.1 pyobjc-framework-WebKit-7.1 pyobjc-framework-iTunesLibrary-7.1 pyobjc-framework-libdispatch-7.1

I first attempted to downgrade via conda-forge (as it its recommended to preserve environment compatibility), but that wasn’t working out. conda-forge didn’t have a single copy of the majority of those pyobjc-framework- packages (https://anaconda.org/search?q=pyobjc), and didn’t have v7.1 for pyobjc-framework-fsevents or pyobjc-framework-quartz. So, I abandoned conda-forge here and used pip (as it’s setup in your env). To test if if the issue was the packages completely missing vs. incompatible package versions, I also tried installing pyobjc=7.3 via pip, and conda failed to setup that env (output omitted due to post character limit).

I’m glad that iohub is working properly now, but do you know what the consequences are of the psychopy conflicts caused by the pip installation? Since it looks like psychopy’s basic env yml might need to be reconfigured, could you also please provide me with a yml export of your env? Thanks again!

Me too! Thank you very much for helping to track this down. It looks like the errors are just related to some missing packages.

  • Install ujson as it is much faster than the builtin json module.
  • I’m not sure what jedi is used for, so may as well install it if
  • If you are planning on using the vlc based video player, then install python-vlc, otherwise ignore it.
  • If you are using a Tobii eye tracker, install tobii-research, otherwise skip it.

Thank you

Hi @sol , I got a chance to test these updates in our collaborator’s lab. The freezing seems to have stopped, which is great! However, it seems that the eyetracking no longer works. I wasn’t necessarily expecting this, as we used a relatively new installation of pylink3.6 (from a July 2021 Eyelink installation).

The behavior is quite strange as well. Now when the program starts up the eyetracker, the normal ioHub instructions appear (though now they are on a white background and aligned to the center, they used to appear on a grey screen aligned left, not sure if this matters). When attempting to calibrate from the Eyelink host, the screen then changes to a blank pink-grey color, and does not display the calibration dots (although the host continues as if it were working properly). No keys on the stimuli computer work (cannot use c, v, enter, etc. to control the eyetracker). We tried forcing a calibration anyway, having a subject look where the dots should be displayed, and then pressing output/record. The calibration showed a ‘success’ message but it didn’t seem to actually track the eye. During this test, the program did open, save, and download an EDF file (which was formatted properly, but showed no information for the eyetracking data (each line was: . . . .)
Here’s the error message that I was getting:

(RSVP_pRF_io_env) dsclab@MacBook-Pro rsvp_prf_iowait % python rsvp_sweep.py
pygame 2.0.2 (SDL 2.0.16, Python 3.6.13)
Hello from the pygame community. https://www.pygame.org/contribute.html



>-----------Start-Run-----------< 

Subject:          JK
Run:              22
Stim Duration:    400 ms
Target Cooldown:  1000 ms
Response Period:  900 ms
Eyetracking:      True
MRI:              True


 *** iohub warning: Display / Monitor unit type has not been set.
displayAPI: Connecting
Connection timed outeyelink_core:Connection timed out
Traceback (most recent call last):
  File "/Users/dsclab/opt/anaconda3/envs/RSVP_pRF_io_env/lib/python3.6/site-packages/psychopy/iohub/devices/eyetracker/hw/sr_research/eyelink/eyetracker.py", line 232, in setConnectionState
    EyeTracker._eyelink = pylink.EyeLink(host_pc_ip_address)
  File "/Users/dsclab/opt/anaconda3/envs/RSVP_pRF_io_env/lib/python3.6/site-packages/pylink/eyelink.py", line 237, in __init__
    self.open(trackeraddress,0)
RuntimeError: Could not connect to tracker at 100.1.1.1
 ** EyeLink Error: Could not connect to EyeLink Eye Tracker. EyeLink Eye tracker device will run in 'dummy' mode.
** WARNING: Mouse Tap Disabled due to timeout. Re-enabling....: 4294967294
pygame 2.0.2 (SDL 2.0.16, Python 3.6.13)
Hello from the pygame community. https://www.pygame.org/contribute.html
self._calibration_args:{'type': 'NINE_POINTS', 'color_type': None, 'unit_type': None, 'auto_pace': True, 'target_duration': 1.5, 'target_delay': 0.75, 'pacing_speed': None, 'screen_background_color': [128, 128, 128], 'target_type': 'CIRCLE_TARGET', 'target_attributes': {'outer_diameter': 33.0, 'inner_diameter': 6.0, 'outer_stroke_width': 2.0, 'outer_fill_color': [64, 64, 64], 'outer_line_color': [255, 255, 255], 'inner_stroke_width': 1.0, 'inner_fill_color': [255, 0, 0], 'inner_line_color': [0, 0, 0], 'outer_color': None, 'inner_color': None}}
** WARNING: Mouse Tap Disabled due to timeout. Re-enabling....: 4294967294
25.9711 	DEPRECATION 	'None' is not a valid color space
26.7064 	DEPRECATION 	'None' is not a valid color space
26.7087 	DEPRECATION 	'None' is not a valid color space
Sweep #1
Stimuli Duration: 400 ms
Accuracy: 4% 

ioHub Server Process Completed With Code:  0
Run 22 completed! 

Here’s a copy of the yml that I used to install the env:

name: RSVP_pRF_io_env
channels:
  - conda-forge
  - defaults
dependencies:
  - appdirs=1.4.4=pyh9f0ad1d_0
  - arabic_reshaper=2.1.3=pyhd8ed1ab_0
  - astunparse=1.6.3=pyhd8ed1ab_0
  - backports=1.0=py_2
  - backports.lzma=0.0.14=py36hcf28acf_3
  - blosc=1.21.0=he49afe7_0
  - brotlipy=0.7.0=py36hfa26744_1001
  - bzip2=1.0.8=h0d85af4_4
  - c-ares=1.18.0=h0d85af4_0
  - ca-certificates=2021.10.8=h033912b_0
  - cairo=1.16.0=h0ab9d94_1001
  - certifi=2021.5.30=py36h79c6626_0
  - cffi=1.14.6=py36hbc36220_1
  - chardet=4.0.0=py36h79c6626_1
  - colorama=0.4.4=pyh9f0ad1d_0
  - configobj=5.0.6=py_0
  - configparser=5.0.2=pyhd8ed1ab_0
  - cryptography=35.0.0=py36ha6a00b0_0
  - cycler=0.10.0=py_2
  - decorator=4.4.2=py_0
  - dukpy=0.2.3=py36hfa26744_1
  - esprima-python=4.0.1=py_2001
  - et_xmlfile=1.0.1=py_1001
  - expat=2.4.1=he49afe7_0
  - ffmpeg=4.3.2=h4dad6da_1
  - fontconfig=2.13.1=h1027ab8_1000
  - freetype=2.10.4=h4cff582_1
  - freetype-py=2.2.0=pyh9f0ad1d_0
  - future=0.18.2=py36h79c6626_3
  - gettext=0.19.8.1=hd1a6beb_1008
  - gevent=21.8.0=py36hfa26744_0
  - gitdb=4.0.9=pyhd8ed1ab_0
  - gitpython=3.1.18=pyhd8ed1ab_0
  - glfw=3.3.4=h0d85af4_0
  - glib=2.70.0=hcf210ce_1
  - glib-tools=2.70.0=hcf210ce_1
  - gmp=6.2.1=h2e338ed_0
  - gnutls=3.6.13=h756fd2b_1
  - graphite2=1.3.13=h2e338ed_1001
  - greenlet=1.1.2=py36hefe7e0e_0
  - harfbuzz=2.4.0=h92b87b8_1
  - hdf5=1.10.6=nompi_hc5d9132_1114
  - icu=58.2=h0a44026_1000
  - idna=2.10=pyh9f0ad1d_0
  - imageio=2.9.0=py_0
  - imageio-ffmpeg=0.4.5=pyhd8ed1ab_0
  - jasper=1.900.1=h636a363_1006
  - javascripthon=0.11=py_0
  - jbig=2.1=h0d85af4_2003
  - jpeg=9d=hbcb3906_0
  - json_tricks=3.15.5=pyhd8ed1ab_0
  - kiwisolver=1.3.1=py36hc61eee1_1
  - krb5=1.19.2=hcfbf3a7_2
  - lame=3.100=h35c211d_1001
  - lcms2=2.12=h577c468_0
  - lerc=3.0=he49afe7_0
  - libblas=3.9.0=12_osx64_openblas
  - libcblas=3.9.0=12_osx64_openblas
  - libcurl=7.79.1=hf45b732_1
  - libcxx=12.0.1=habf9029_0
  - libdeflate=1.8=h0d85af4_0
  - libedit=3.1.20191231=h0678c8f_2
  - libev=4.33=haf1e3a3_1
  - libffi=3.4.2=he49afe7_4
  - libflac=1.3.3=h046ec9c_1
  - libgfortran=5.0.0=9_3_0_h6c81a4c_23
  - libgfortran5=9.3.0=h6c81a4c_23
  - libglib=2.70.0=hf1fb8c0_1
  - libiconv=1.16=haf1e3a3_0
  - liblapack=3.9.0=12_osx64_openblas
  - liblapacke=3.9.0=12_osx64_openblas
  - libnghttp2=1.43.0=h6f36284_1
  - libogg=1.3.4=h35c211d_1
  - libopenblas=0.3.18=openmp_h3351f45_0
  - libopencv=4.4.0=py36_2
  - libopus=1.3.1=hc929b4f_1
  - libpng=1.6.37=h7cec526_2
  - libsndfile=1.0.31=he49afe7_1
  - libsodium=1.0.18=hbcb3906_1
  - libssh2=1.10.0=h52ee1ee_2
  - libtiff=4.3.0=hd146c10_2
  - libuv=1.42.0=h0d85af4_0
  - libvorbis=1.3.7=h046ec9c_0
  - libwebp-base=1.2.1=h0d85af4_0
  - libxml2=2.9.9=hd80cff7_2
  - libzlib=1.2.11=h9173be1_1013
  - llvm-openmp=12.0.1=hda6cdc1_1
  - lz4-c=1.9.3=he49afe7_1
  - macropy3=1.1.0b2=py_0
  - matplotlib=3.3.4=py36h79c6626_0
  - matplotlib-base=3.3.4=py36h4ea959b_0
  - mock=4.0.3=py36h79c6626_1
  - moviepy=1.0.1=py_0
  - msgpack-numpy=0.4.7.1=pyh9f0ad1d_0
  - msgpack-python=1.0.2=py36hc61eee1_1
  - ncurses=6.2=h2e338ed_4
  - nettle=3.6=hedd7734_0
  - numexpr=2.7.3=py36he43235d_0
  - numpy=1.19.5=py36h08b5fde_2
  - olefile=0.46=pyh9f0ad1d_1
  - opencv=4.4.0=py36_2
  - openh264=2.1.1=hfd3ada9_0
  - openjpeg=2.4.0=h6e7aa92_1
  - openpyxl=3.0.9=pyhd8ed1ab_0
  - openssl=1.1.1l=h0d85af4_0
  - packaging=21.0=pyhd8ed1ab_0
  - pandas=1.1.5=py36h2be6da3_0
  - pathlib2=2.3.6=py36h79c6626_0
  - pcre=8.45=he49afe7_0
  - pillow=8.3.2=py36h950f3bb_0
  - pip=21.3.1=pyhd8ed1ab_0
  - pixman=0.38.0=h01d97ff_1003
  - portaudio=19.6.0=he49afe7_4
  - proglog=0.1.9=py_0
  - psutil=5.8.0=py36hfa26744_1
  - psychopy=2021.2.3=py36h79c6626_0
  - pthread-stubs=0.4=hc929b4f_1001
  - py-opencv=4.4.0=py36h95af2a2_2
  - pycparser=2.20=pyh9f0ad1d_2
  - pyglet=1.5.16=py36h79c6626_0
  - pyglfw=2.3.0=py36h79c6626_0
  - pyopengl=3.1.5=py_0
  - pyopenssl=21.0.0=pyhd8ed1ab_0
  - pyosf=1.0.5=py_2
  - pyparsing=3.0.1=pyhd8ed1ab_1
  - pypubsub=4.0.3=py_0
  - pyqmix=2021.1.2=py36h79c6626_0
  - pyqt=5.6.0=py36hc26a216_1008
  - pyserial=3.5=pyhd8ed1ab_0
  - pysocks=1.7.1=py36h79c6626_3
  - pysoundfile=0.10.3.post1=pyhd3deb0d_0
  - pytables=3.6.1=py36h256c1cb_3
  - python=3.6.13=haf480d7_2_cpython
  - python-bidi=0.4.2=py_0
  - python-dateutil=2.8.2=pyhd8ed1ab_0
  - python-gitlab=2.10.1=pyhd8ed1ab_0
  - python-sounddevice=0.4.1=pyh9f0ad1d_0
  - python.app=1.3=py36hfa26744_5
  - python_abi=3.6=2_cp36m
  - pytz=2021.3=pyhd8ed1ab_0
  - pyyaml=5.4.1=py36hfa26744_1
  - pyzmq=22.3.0=py36h50cd92c_0
  - qt=5.6.2=h822fa55_1013
  - questplus=2019.4=py_0
  - readline=8.1=h05e3726_0
  - requests=2.25.1=pyhd3deb0d_0
  - requests-toolbelt=0.9.1=py_0
  - ruamel.yaml=0.17.16=py36hfa26744_0
  - ruamel.yaml.clib=0.2.2=py36h20b66c6_2
  - scipy=1.5.3=py36h4f136de_1
  - setuptools=58.0.4=py36h79c6626_2
  - sip=4.18.1=py36h0a44026_1000
  - six=1.16.0=pyh6c4a22f_0
  - smmap=3.0.5=pyh44b312d_0
  - sqlite=3.36.0=h23a322b_2
  - tk=8.6.11=h5dbffcc_1
  - tornado=6.1=py36hfa26744_1
  - tqdm=4.62.3=pyhd8ed1ab_0
  - typing_extensions=3.10.0.2=pyha770c72_0
  - urllib3=1.26.7=pyhd8ed1ab_0
  - webassets=2.0=py_0
  - websocket-client=0.57.0=py36h79c6626_4
  - wheel=0.37.0=pyhd8ed1ab_1
  - wxpython=4.0.6=py36h1cd7e00_1
  - x264=1!161.3030=h0d85af4_1
  - xarray=0.18.2=pyhd8ed1ab_0
  - xlrd=2.0.1=pyhd8ed1ab_3
  - xz=5.2.5=haf1e3a3_1
  - yaml=0.2.5=haf1e3a3_0
  - zeromq=4.3.4=he49afe7_1
  - zlib=1.2.11=h9173be1_1013
  - zope.event=4.5.0=pyh9f0ad1d_0
  - zope.interface=5.4.0=py36hfa26744_0
  - zstd=1.5.0=h582d3a0_0
  - pip:
    - psychtoolbox==3.0.18.0
    - pygame==2.0.2
    - pyo==1.0.4
    - pyobjc==7.1
    - pyobjc-core==7.1
    - pyobjc-framework-accounts==7.1
    - pyobjc-framework-addressbook==7.1
    - pyobjc-framework-adsupport==7.1
    - pyobjc-framework-applescriptkit==7.1
    - pyobjc-framework-applescriptobjc==7.1
    - pyobjc-framework-applicationservices==7.1
    - pyobjc-framework-automator==7.1
    - pyobjc-framework-avfoundation==7.1
    - pyobjc-framework-avkit==7.1
    - pyobjc-framework-businesschat==7.1
    - pyobjc-framework-calendarstore==7.1
    - pyobjc-framework-cfnetwork==7.1
    - pyobjc-framework-cloudkit==7.1
    - pyobjc-framework-cocoa==7.1
    - pyobjc-framework-collaboration==7.1
    - pyobjc-framework-colorsync==7.1
    - pyobjc-framework-contacts==7.1
    - pyobjc-framework-contactsui==7.1
    - pyobjc-framework-coreaudio==7.1
    - pyobjc-framework-coreaudiokit==7.1
    - pyobjc-framework-corebluetooth==7.1
    - pyobjc-framework-coredata==7.1
    - pyobjc-framework-corelocation==7.1
    - pyobjc-framework-coremedia==7.1
    - pyobjc-framework-coremediaio==7.1
    - pyobjc-framework-coremidi==7.1
    - pyobjc-framework-coreml==7.1
    - pyobjc-framework-coreservices==7.1
    - pyobjc-framework-corespotlight==7.1
    - pyobjc-framework-coretext==7.1
    - pyobjc-framework-corewlan==7.1
    - pyobjc-framework-cryptotokenkit==7.1
    - pyobjc-framework-dictionaryservices==7.1
    - pyobjc-framework-discrecording==7.1
    - pyobjc-framework-discrecordingui==7.1
    - pyobjc-framework-diskarbitration==7.1
    - pyobjc-framework-dvdplayback==7.1
    - pyobjc-framework-eventkit==7.1
    - pyobjc-framework-exceptionhandling==7.1
    - pyobjc-framework-externalaccessory==7.1
    - pyobjc-framework-findersync==7.1
    - pyobjc-framework-fsevents==7.1
    - pyobjc-framework-gamecenter==7.1
    - pyobjc-framework-gamecontroller==7.1
    - pyobjc-framework-gamekit==7.1
    - pyobjc-framework-gameplaykit==7.1
    - pyobjc-framework-imagecapturecore==7.1
    - pyobjc-framework-imserviceplugin==7.1
    - pyobjc-framework-inputmethodkit==7.1
    - pyobjc-framework-installerplugins==7.1
    - pyobjc-framework-instantmessage==7.1
    - pyobjc-framework-intents==7.1
    - pyobjc-framework-iosurface==7.1
    - pyobjc-framework-ituneslibrary==7.1
    - pyobjc-framework-latentsemanticmapping==7.1
    - pyobjc-framework-launchservices==7.1
    - pyobjc-framework-libdispatch==7.1
    - pyobjc-framework-localauthentication==7.1
    - pyobjc-framework-mapkit==7.1
    - pyobjc-framework-mediaaccessibility==7.1
    - pyobjc-framework-medialibrary==7.1
    - pyobjc-framework-mediaplayer==7.1
    - pyobjc-framework-mediatoolbox==7.1
    - pyobjc-framework-metal==7.1
    - pyobjc-framework-metalkit==7.1
    - pyobjc-framework-metalperformanceshaders==7.1
    - pyobjc-framework-modelio==7.1
    - pyobjc-framework-multipeerconnectivity==7.1
    - pyobjc-framework-naturallanguage==7.1
    - pyobjc-framework-netfs==7.1
    - pyobjc-framework-network==7.1
    - pyobjc-framework-networkextension==7.1
    - pyobjc-framework-notificationcenter==7.1
    - pyobjc-framework-opendirectory==7.1
    - pyobjc-framework-osakit==7.1
    - pyobjc-framework-photos==7.1
    - pyobjc-framework-photosui==7.1
    - pyobjc-framework-preferencepanes==7.1
    - pyobjc-framework-quartz==7.1
    - pyobjc-framework-safariservices==7.1
    - pyobjc-framework-scenekit==7.1
    - pyobjc-framework-screensaver==7.1
    - pyobjc-framework-scriptingbridge==7.1
    - pyobjc-framework-searchkit==7.1
    - pyobjc-framework-security==7.1
    - pyobjc-framework-securityfoundation==7.1
    - pyobjc-framework-securityinterface==7.1
    - pyobjc-framework-servicemanagement==7.1
    - pyobjc-framework-social==7.1
    - pyobjc-framework-spritekit==7.1
    - pyobjc-framework-storekit==7.1
    - pyobjc-framework-syncservices==7.1
    - pyobjc-framework-systemconfiguration==7.1
    - pyobjc-framework-usernotifications==7.1
    - pyobjc-framework-videosubscriberaccount==7.1
    - pyobjc-framework-videotoolbox==7.1
    - pyobjc-framework-vision==7.1
    - pyobjc-framework-webkit==7.1
    - pyparallel==0.2.2

Today I tried to replicate these eyetracker issue in my home lab, but I couldn’t even get that far - the env failed to install properly, throwing an error about pyobjc not being properly installed by pip.

Hi @jeffkravitz,

Some of the coloring issues you mention are likely stemming from this warning and some other related changes since 2021.2.x:

iohub warning: Display / Monitor unit type has not been set.

iohub no longer uses a fixed color space / type for calibration graphics. It is now specified using the color_type calibration setting for the device. All the other color related calibration settings need to specify colors using the color_type provided. If it is None, it uses the same color space as the psychopy window which should now be passed to launchHubServer. For example:

    use_unit_type = 'height'
    use_color_type = 'rgb'

    eyetracker_config['model_name'] = 'EYELINK 1000 DESKTOP'
    eyetracker_config['simulation_mode'] = False
    eyetracker_config['runtime_settings'] = dict(sampling_rate=1000, track_eyes='RIGHT')
    eyetracker_config['calibration'] = dict(auto_pace=True,
                                            target_duration=1.5,
                                            target_delay=1.0,
                                            screen_background_color=(0, 0, 0),
                                            type='NINE_POINTS',
                                            unit_type=None, # None == use same units as psychopy win
                                            color_type=None, # None == use same color space as psychopy win
                                            target_attributes=dict(outer_diameter=0.05,
                                                                   inner_diameter=0.025,
                                                                   outer_fill_color=[-0.5, -0.5, -0.5],
                                                                   inner_fill_color=[-1, 1, -1],
                                                                   outer_line_color=[1, 1, 1],
                                                                   inner_line_color=[-1, -1, -1]
                                                                   )
                                            )
    devices_config['eyetracker.hw.sr_research.eyelink.EyeTracker'] = eyetracker_config

    win = visual.Window((1920, 1080),
                    units=use_unit_type,
                    fullscr=True,
                    allowGUI=False,
                    colorSpace=use_color_type,
                    monitor='55w_60dist',
                    color=[0, 0, 0]
                    )

    io = iohub.launchHubServer(window=win, **devices_config)

The psychopy/demos/coder/iohub/eyetracking/validation.py demo uses all the eyelink calibration settings as well as the window kwarg to launchHubServer. I’m happy to help update the startup part of your experiment script if you get stuck.

It also looks like the network connection was not setup correctly for the eyelink:

RuntimeError: Could not connect to tracker at 100.1.1.1
 ** EyeLink Error: Could not connect to EyeLink Eye Tracker. EyeLink Eye tracker device will run in 'dummy' mode.

This is likely because of a cable issue or because the mac network port was not set to use ip 100.1.1.2 subnet 255.255.255.0. this explains why it was not actually recording eye data.

So from what I can tell, once the script is updated with the extra calibration settings and to use the window kwarg with launchHubServer, things should run as expected (assuming it can connect to the eye tracker).

macOS can be a real pain IMO. :wink:

Thanks again, please let me know how it goes.

Hi @jeffkravitz ,

I should have also mentioned that if you want to just use the original default settings for the eyelink calibration and are using ‘pix’ units , you can just add the unit_type and color_type settings to the eyelink config:

eyetracker_config['model_name'] = 'EYELINK 1000 DESKTOP'
eyetracker_config['simulation_mode'] = False
eyetracker_config['runtime_settings'] = dict(sampling_rate=1000, track_eyes='RIGHT')
eyetracker_config['calibration'] = dict(unit_type='pix',  color_type='rgb255')
devices_config['eyetracker.hw.sr_research.eyelink.EyeTracker'] = eyetracker_config

win = visual.Window((1920, 1080),  units='pix', fullscr=True, allowGUI=False,
                    colorSpace='rgb255', monitor='55w_60dist', color=[128, 128, 128])

io = iohub.launchHubServer(window=win, **devices_config)

Actually, if your psychopy experiment window is using ‘rgb255’ color space and ‘pix’ units, you should not need to change your eyelink config settings, just pass the psychopy window to launchHubServer:

win = visual.Window((1920, 1080),  units='pix', fullscr=True, allowGUI=False,
                    colorSpace='rgb255', monitor='55w_60dist', color=[128, 128, 128])

io = iohub.launchHubServer(window=win, **devices_config) 

Hi @sol , we finally got a chance to test in a MRI machine, and it worked perfectly (after adjustments to the eyetracker code)! Thank you so much for your help through this process, I really appreciate it! Happy Holidays :snowman_with_snow: