mne-tools / mne-realtime

Realtime data analysis with MNE-Python
https://mne.tools/mne-realtime/
BSD 3-Clause "New" or "Revised" License
52 stars 23 forks source link

Initialize LSL Client without info specification #28

Closed timonmerk closed 3 years ago

timonmerk commented 3 years ago

When a LSLClient class get's instantiated, e.g. in such way with LSLClient(host="openbci_eeg_id255", wait_max=wait_max) as client:, the base client throws the following error:

File "C:\Users\ICN_admin\Anaconda3\envs\MNERealTime\lib\site-packages\mne_realtime\base_client.py", line 79, in enter self.info = self._create_info()

File "C:\Users\ICN_admin\Anaconda3\envs\MNERealTime\lib\site-packages\mne_realtime\lsl_client.py", line 129, in _create_info info = create_info(ch_names, sfreq, ch_types, montage=montage)

TypeError: create_info() got an unexpected keyword argument 'montage'

The recent create_info actually doesn't have the montage parameter https://mne.tools/stable/generated/mne.create_info.html and throws a TypeError instead of a ValueError in lsl_client.py

I adapted this in the second commit in PR #25