Beta Serial Port Component Errors

OS: Win 10
PsychoPy version: 2022.2.4
Standard Standalone? (y/n): Y
What are you trying to achieve?: I am trying to send triggers to ActiView (Biosemi) using the beta serial port component in the builder. My hardware setup is exactly as the one shown here: Serial Port EEGbiosemi

What did you try to make it work?:
I followed the instructions on this page: Sending triggers via a Serial Port — PsychoPy v2022.2.4
I created a test experiment to check if the digital signal is being sent from the stimulus presentation laptop to the EEG recording laptop.

What specifically went wrong when you tried that?:
The first error I received was:

ValueError: Not a valid parity: None

I fixed this temporarily by choosing “Off” instead of “None” in the drop down selection:

Then my test experiment run ok, no errors, the serial port COM3 was opened successfully I believe because otherwise, I would get an error.
No signal was received on the EEG laptop. I tried connecting the Biosemi USB Trigger Interface to different USB sockets as well to check whether it would make a difference but it did not.

I noticed a number of warnings in the terminal output:

2142.7694     WARNING     Parameter baudrate has unrecognised inputType "int"
2142.7730     WARNING     Parameter bytesize has unrecognised inputType "int"
2142.7760     WARNING     Parameter stopbits has unrecognised inputType "int"
2399.9703     WARNING     Parameter baudrate has unrecognised inputType "int"
2399.9731     WARNING     Parameter bytesize has unrecognised inputType "int"
2399.9763     WARNING     Parameter stopbits has unrecognised inputType "int"

Any hints on how to fix this?

It could be that the value needs converting to a different type for this device, for fields which are open text entry in Builder this can be done by adding a “$” so PsychoPy knows to treat the value as code and then using whatever Python type conversion function is needed: Type Conversion in Python - GeeksforGeeks

Could you share your test experiment? It’s easier to debug when I can see what code is being compiled.

Hi @TParsons !

I have solved the issue now by scripting the serial port instead.
I followed the instructions to setup the serial port using the custom code component and it worked.
The only thing I had to add was the baudrate which is not currently in the instructions.

For the beta serial port component, I attach the original experiment with the configurations. However, the baudrate here was also incorrect. So it could be the case that this would have worked if I had the correct baudrate (but I cannot test this rn).

trial.psyexp (12.0 KB) (15.2 KB)