If this template helps then use it. If not then just delete and start from scratch.
OS Win10
PsychoPy 2022.2.4
What are you trying to achieve?:
Using multiple serial components in a single experiment (single routine even) to create multiple event markers at different times within a trial.
What did you try to make it work?:
Adding multiple serial components and setting them accordingly.
What specifically went wrong when you tried that?:
raise SerialException("could not open port {!r}: {!r}".format(self.portstr, ctypes.WinError()))
serial.serialutil.SerialException: could not open port 'COM5': PermissionError(13, 'Access is denied.', None, 5)
################# Experiment ended with exit code 1 [pid:7512] #################
From the access denied error above, it appears that each serial component is trying to access the same COM port but separately, so the second one crashes and causes the error. Is this a known issue with the serial component? Or have I just done something entirely wrong? (Hopefully the latter.)
Also… Setting Parity to None
as I would when using a Code component for serial communication also crashes the experiment and I can only get it working when setting Parity to Off
. Is this expected?