The ‘pstbox.py’ sample program (psychopy/pstbox.py at release · psychopy/psychopy · GitHub), which used to work a year ago, now crashes when calling launchHubServer. Nothing has changed on my computer in the meantime except that I’ve updated PsychoPy from v1.82 to v1.85.6. The problem seems to be with its use of the serial.Pstbox class, since a similar sample program that uses the serial.Serial class instead (URL no longer active) still runs OK. To clarify, I’ve attached two simplified programs: the ‘lampsTest serial.py’ program works and the ‘lampsTest pstbox.py’ program doesn’t.
lampsTest serial.py (1.5 KB)
lampsTest pstbox.py (1.1 KB)
Has anybody else experienced this?
The error message is as follows:
Error during device creation …
<type ‘exceptions.IndexError’>
IndexError(‘boolean index did not match indexed array along dimension 0; dimension is 9 but corresponding boolean dimension is 8’,)
[’ File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy\iohub\server.py”, line 591, in createNewMonitoredDevice\n device_instance_and_config=self.addDeviceToMonitor(device_class_name,deviceConfig)\n’,
’ File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy\iohub\server.py”, line 781, in addDeviceToMonitor\n deviceInstance=DeviceClass(dconfig=device_config)\n’,
’ File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy\iohub\devices\serial\init.py”, line 515, in init\n self._update_state()\n’,
’ File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy\iohub\devices\serial\init.py”, line 528, in _update_state\n state_bits = (2**N.arange(9))[state]\n’]
Error during device creation …
<class ‘psychopy.iohub.util.exception_tools.ioHubError’>
ioHubError:
Args: (‘Error during device creation …’,)
[’ File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy\iohub\server.py”, line 520, in init\n self.createNewMonitoredDevice(device_class_name,deviceConfig)\n’,
’ File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy\iohub\server.py”, line 603, in createNewMonitoredDevice\n raise ioHubError(“Error during device creation …”)\n’]
<class ‘psychopy.iohub.util.exception_tools.ioHubError’>
ioHubError:
Args: (‘Error during device creation …’,)
[’ File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy\iohub\launchHubProcess.py”, line 35, in run\n s = ioServer(rootScriptPathDir, ioHubConfig)\n’,
’ File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy\iohub\server.py”, line 524, in init\n raise ioHubError(“Error during device creation …”)\n’]
Closing remaining open files:\uol.le.ac.uk\root\staff\home\r\rk239\My Documents\Psychopy communicating with BIOPAC\github sample programs\pstbox.hdf5…done
Traceback (most recent call last):
File “\uol.le.ac.uk\root\staff\home\r\rk239\My Documents\Psychopy communicating with BIOPAC\github sample programs\pstbox.py”, line 35, in
io = launchHubServer(**iohubkwargs)
File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy\iohub\client_init_.py”, line 1504, in launchHubServer
return ioHubConnection(ioConfig)
File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy\iohub\client_init_.py”, line 285, in init
self.iohub_status = self.startServer(ioHubConfig, ioHubConfigAbsPath)
File "C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy\iohub\client_init.py", line 943, in _startServer
isDataAvail=self.serverStdOutHasData()
File "C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy\iohub\client_init.py", line 1052, in _serverStdOutHasData
raise e
pywintypes.error: (109, ‘PeekNamedPipe’, ‘The pipe has been ended.’)