Eye-tracking using iohub - util.readConfig() not working

Hey
I have been trying to connect eyetracker with iohub_config.yaml file - In Building experiments in psychoPy book chapter 19 which has eye-tracking set up - they use:

config_file = expInfo[‘Eye tracker config’]
from psychopy.iohub import util, client

io_config = util.readConfig(config_file)

If I use util.readConfig i get an error.
Is there anything else that is supposed to work? How can i open .yaml file for the eye-tracker?

Thanks!

OS (e.g. Win10):
PsychoPy version (e.g. 1.84.x):
Standard Standalone? (y/n) If not then what?:
What are you trying to achieve?:

What did you try to make it work?:

What specifically went wrong when you tried that?:
Include pasted full error message if possible. “That didn’t work” is not enough information.

As it says in the template “That didn’t work” is not enough. Please post the actual error.

Oh I’m sorry, here is what comes in the output :slight_smile:

Running: C:\Users\Notandi\Desktop\HI\Meistaraverkefni\tilrauntest\face_eyetrack_test.py

Traceback (most recent call last):
File “C:\Users\Notandi\Desktop\HI\Meistaraverkefni\tilrauntest\face_eyetrack_test.py”, line 77, in
io_config = util.readConfig(config_file)
File “C:\Program Files (x86)\PsychoPy3\lib\site-packages\psychopy\iohub\util_init_.py”, line 51, in readConfig
return yload(open(scr_path, ‘r’), Loader=yLoader)
File “C:\Program Files (x86)\PsychoPy3\lib\site-packages\yaml_init_.py”, line 72, in load
return loader.get_single_data()
File “C:\Program Files (x86)\PsychoPy3\lib\site-packages\yaml\constructor.py”, line 35, in get_single_data
node = self.get_single_node()
File “C:\Program Files (x86)\PsychoPy3\lib\site-packages\yaml\composer.py”, line 36, in get_single_node
document = self.compose_document()
File “C:\Program Files (x86)\PsychoPy3\lib\site-packages\yaml\composer.py”, line 55, in compose_document
node = self.compose_node(None, None)
File “C:\Program Files (x86)\PsychoPy3\lib\site-packages\yaml\composer.py”, line 84, in compose_node
node = self.compose_mapping_node(anchor)
File “C:\Program Files (x86)\PsychoPy3\lib\site-packages\yaml\composer.py”, line 133, in compose_mapping_node
item_value = self.compose_node(node, item_key)
File “C:\Program Files (x86)\PsychoPy3\lib\site-packages\yaml\composer.py”, line 82, in compose_node
node = self.compose_sequence_node(anchor)
File “C:\Program Files (x86)\PsychoPy3\lib\site-packages\yaml\composer.py”, line 110, in compose_sequence_node
while not self.check_event(SequenceEndEvent):
File “C:\Program Files (x86)\PsychoPy3\lib\site-packages\yaml\parser.py”, line 98, in check_event
self.current_event = self.state()
File “C:\Program Files (x86)\PsychoPy3\lib\site-packages\yaml\parser.py”, line 393, in parse_block_sequence_entry
“expected , but found %r” % token.id, token.start_mark)
yaml.parser.ParserError: while parsing a block collection
in “iohub_config.yaml”, line 2, column 5
expected , but found ‘’
in “iohub_config.yaml”, line 15, column 6
9.7575 WARNING Couldn’t measure a consistent frame rate.

  • Is your graphics card set to sync to vertical blank?
  • Are you running other processes on your computer?

10.0711 WARNING t of last frame was 31.25ms (=1/31)
10.1030 WARNING t of last frame was 31.88ms (=1/31)
10.1340 WARNING t of last frame was 31.03ms (=1/32)
10.1651 WARNING t of last frame was 31.13ms (=1/32)
10.1966 WARNING Multiple dropped frames have occurred - I’ll stop bothering you about them!
12.5532 WARNING Couldn’t measure a consistent frame rate.

  • Is your graphics card set to sync to vertical blank?
  • Are you running other processes on your computer?