Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: PlayerLSL.__init__() got an unexpected keyword argument 'source_id' #340

Open
thiago-roque07 opened this issue Oct 2, 2024 · 3 comments

Comments

@thiago-roque07
Copy link

I just started learning how to use mne-lsl and I got this error message while running the tutorial.
PlayerLSL works fine if I remove source_id from its initialization, but running the tutorial as it is written gives me this error message.
Maybe there is a divergence between versions?

Being able to set IDs for PlayerLSL is important to me as I'm planning to create multiple players to emulate inter-brain connectivity from a dual-EEG setup.

@mscheltienne
Copy link
Member

Hello, it's very likely a version problem as all the tutorials are completely entirely executed without error by the CI to build the website. Can you provide the output of:

import mne_lsl

mne_lsl.sys_info()

And which tutorial are you referring too?

@thiago-roque07
Copy link
Author

Thanks for the reply Mathieu.

This is the full output of sys_info()

Platform: Windows-10-10.0.22631-SP0
Python: 3.10.9 | packaged by Anaconda, Inc. | (main, Mar 1 2023, 18:18:15) [MSC v.1916 64 bit (AMD64)]
Executable: c:\Users\thiag\anaconda3\python.exe
CPU: Intel64 Family 6 Model 165 Stepping 2, GenuineIntel
Physical cores: 6
Logical cores: 12
RAM: 31.9 GB
SWAP: 11.0 GB
mne_lsl: 1.3.1
liblsl: 1.16 (c:\Users\thiag\anaconda3\lib\site-packages\mne_lsl\lsl\lib\liblsl-1.16.2-Win_amd64.dll)

Core dependencies
✔︎ mne (>=1.4.2): 1.6.1
✔︎ numpy (>=1.21): 1.26.4
✔︎ packaging: 24.1
✔︎ pooch: 1.7.0
✔︎ psutil: 5.9.0
✔︎ pyqtgraph: 0.13.3
✔︎ qtpy: 2.2.0
✔︎ requests: 2.28.1
✔︎ scipy: 1.13.1
✘ Not installed: distro

I'm following tutorial 00_introduction.py.
this is my version of the code: (the same thing happens with the original 00_introduction,py code)

this_path = pathlib.Path().absolute()
source_id = uuid.uuid4().hex
fname_lead = this_path / "simple1_lead_eeg.fif"
player_lead = PlayerLSL(fname_lead, chunk_size=128, name = 'lead', source_id = source_id).start()
player_lead.info

And the output:

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[58], line 6
      3 source_id = uuid.uuid4().hex
      5 fname_lead = this_path / \"simple1_lead_eeg.fif\"
----> 6 player_lead = PlayerLSL(fname_lead, chunk_size=128, name = 'lead', source_id = source_id).start()
      7 player_lead.info

TypeError: PlayerLSL.__init__() got an unexpected keyword argument 'source_id'"
}

@drammock
Copy link
Member

drammock commented Oct 3, 2024

source_id of the PlayerLSL object was only added in version 1.5, you are running version 1.3. Is updating MNE-LSL an acceptable solution? Or is your environment locked down?

(specifically, was added in #305 / 7fee1d3)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants