Error when trying to use eyetracker

I have been trying to link an eyetracking function to my existing psychopy experiment, and was testing out the following example code on the psychopy website:

Examples:
A. Start ioHub with SR Research EyeLink 1000 and run tracker calibration::
from psychopy.iohub import launchHubServer
from psychopy.core import getTime, wait
iohub_config = {‘eyetracker.hw.sr_research.eyelink.EyeTracker’:
{‘name’: ‘tracker’,
‘model_name’: ‘EYELINK 1000 DESKTOP’,
‘runtime_settings’: {‘sampling_rate’: 500,
‘track_eyes’: ‘RIGHT’}
}
}
io = launchHubServer(**iohub_config)

        # Get the eye tracker device.
        tracker = io.devices.tracker
                        
        # run eyetracker calibration
        r = tracker.runSetupProcedure()
        
    B. Print all eye tracker events received for 2 seconds::
                    
        # Check for and print any eye tracker events received...
        tracker.setRecordingState(True)
        
        stime = getTime()
        while getTime()-stime < 2.0:
            for e in tracker.getEvents():
                print(e)
        
    C. Print current eye position for 5 seconds::
                    
        # Check for and print current eye position every 100 msec.
        stime = getTime()
        while getTime()-stime < 5.0:
            print(tracker.getPosition())
            wait(0.1)
        
        tracker.setRecordingState(False)
        
        # Stop the ioHub Server
        io.quit()

But I received this error:

ioHub Server Process Completed With Code: 0
2020-02-12 16:37:05.578 python[3592:63155] ApplePersistenceIgnoreState: Existing state will not be touched. New state will be written to (null)
975 thread_policy_set failed: 4.
IOHUB_DEVICE_EXCEPTION.Error: Could not retrieve sample rate modes from EyeLink Host. EyeTracker.setSamplingRate None
EYELINK Error during _setEyesToTrack:
Traceback (most recent call last):
File “/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/psychopy/iohub/devices/eyetracker/hw/sr_research/eyelink/eyetracker.py”, line 1281, in _setEyesToTrack
self._eyelink.sendCommand(‘current_camera = %s’ % (track_eyes))
RuntimeError: Not available in EyeLink CL mode.
objc[3592]: Class SDLTranslatorResponder is implemented in both /Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/pygame/.dylibs/libSDL-1.2.0.dylib (0x125cf45c0) and /Applications/PsychoPy3.app/Contents/Frameworks/SDL.framework/Versions/A/SDL (0x12e60f268). One of the two will be used. Which one is undefined.
objc[3592]: Class SDL_QuartzWindow is implemented in both /Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/pygame/.dylibs/libSDL-1.2.0.dylib (0x125cf45e8) and /Applications/PsychoPy3.app/Contents/Frameworks/SDL.framework/Versions/A/SDL (0x12e60f290). One of the two will be used. Which one is undefined.
objc[3592]: Class SDL_QuartzWindowDelegate is implemented in both /Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/pygame/.dylibs/libSDL-1.2.0.dylib (0x125cf4660) and /Applications/PsychoPy3.app/Contents/Frameworks/SDL.framework/Versions/A/SDL (0x12e60f308). One of the two will be used. Which one is undefined.
objc[3592]: Class SDL_QuartzView is implemented in both /Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/pygame/.dylibs/libSDL-1.2.0.dylib (0x125cf46b0) and /Applications/PsychoPy3.app/Contents/Frameworks/SDL.framework/Versions/A/SDL (0x12e60f358). One of the two will be used. Which one is undefined.
RPC_DEVICE_RUNTIME_ERROR
Traceback (most recent call last):
File “/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/psychopy/iohub/server.py”, line 266, in handleExperimentDeviceRequest
result = method()
File “/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/psychopy/iohub/devices/eyetracker/hw/sr_research/eyelink/eyetracker.py”, line 400, in runSetupProcedure
if starting_state != EyeTrackerConstants.DEFAULT_SETUP_PROCEDURE:
NameError: name ‘starting_state’ is not defined
=============================
Error trying to send data to experiment process:
max_pkt_sz: 32748
reply_data_sz: 136211
pkt_cnt: 5
packet index, byte index: 00
Traceback (most recent call last):
File “/Users/admin/Desktop/latest fmri scripts/latest word fmri eyetracker copy 3/latest_word_fmri_lastrun.py”, line 595, in
for e in tracker.getEvents():
File “/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/psychopy/iohub/client/init.py”, line 94, in call
Traceback (most recent call last):
File “/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/psychopy/iohub/server.py”, line 344, in sendResponse
self.socket.sendto(reply_data[si:si+max_pkt_sz], address)
File “/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/gevent/_socket3.py”, line 433, in sendto
return _socket.socket.sendto(self._sock, *args)
OSError: [Errno 40] Message too long
=============================
return [conversionMethod(el) for el in r]
TypeError: ‘int’ object is not iterable

Could someone please help?