agencyenterprise / neural-data-simulator

Electrophysiology data simulator for developing brain-computer interfaces
https://agencyenterprise.github.io/neural-data-simulator/
Apache License 2.0
69 stars 7 forks source link

Can't `Ctrl-C` `decoder` out of waiting for LSL stream #50

Open charlesbmi opened 11 months ago

charlesbmi commented 11 months ago

Describe the bug

If a script like decoder is run without the appropriate LSL stream, the script gets stuck. That part is expected behavior, but Ctrl-C doesn't exit out of the script, so it is necessary to close the terminal or kill the Python process.

Steps to reproduce

Replace this text with a code snippet or minimal working example to replicate your problem.

❯ decoder
INFO [nds-decoder]: Using settings from '/Users/charles/.nds/settings_decoder.yaml'
^C

(Does not exit script).

Include a description of your setup including:

Expected results

Script exits on Ctrl-C.

Actual results

Script does not exit:

image
charlesbmi commented 11 months ago

Looks like this is a direct result of: https://github.com/labstreaminglayer/pylsl/issues/35

charlesbmi commented 11 months ago

If I understand https://github.com/labstreaminglayer/pylsl/issues/35#issuecomment-699951968 correctly:

resolve_stream is a legacy function and is hence just in place to prevent older projects from breaking

we should move away from the resolve_stream legacy function.