MikeW
(Mxw976)
January 10, 2024, 1:32pm
1
Hi I am struggling to get the decoding tutorials to run, even with the code and parameters provided due to an error which I canβt quite understand.
The error is:
BaseEpochs.get_data() got an unexpected keyword argument βcopyβ
This occurs when running the line:
X = epochs.get_data(copy=False)
Can anyone think of a reason why this is happening?
I am using the most up to date MNE and using Spyder (MNE) to run the code.
Thanks in advance!
cbrnr
(Clemens Brunner)
January 10, 2024, 2:03pm
2
Which tutorial produces this error?
MikeW
(Mxw976)
January 10, 2024, 2:14pm
3
Iβve found it with both the " Motor imagery decoding from EEG data using the Common Spatial Pattern (CSP)" and " Decoding in time-frequency space using Common Spatial Patterns (CSP)" tutorials.
cbrnr
(Clemens Brunner)
January 10, 2024, 2:20pm
4
Something is wrong with your Python installation then, because we continually test all tutorials and examples (which we render on our website). How did you install MNE? Can you post the output of mne.sys_info()
? You might want to start in a fresh virtual environment.
MikeW
(Mxw976)
January 10, 2024, 2:28pm
5
I installed by downloading the installers on mne.tools. The output from sys_info is:
Platform macOS-12.4-x86_64-i386-64bit
Python 3.11.5 | packaged by conda-forge | (main, Aug 27 2023, 03:35:23) [Clang 15.0.7 ]
Executable /Users/u1984485/Applications/MNE-Python/1.5.1_0/.mne-python/bin/python
CPU i386 (8 cores)
Memory 16.0 GB
Core
ββ mne 1.5.1
ββ numpy 1.24.4 (OpenBLAS 0.3.24 with 8 threads)
ββ scipy 1.11.2
ββ matplotlib 3.7.2 (backend=Qt5Agg)
ββ pooch 1.7.0
ββ jinja2 3.1.2
Numerical (optional)
ββ sklearn 1.3.0
ββ numba 0.57.1
ββ nibabel 5.1.0
ββ nilearn 0.10.1
ββ dipy 1.7.0
ββ openmeeg 2.5.6
ββ pandas 2.1.0
ββ unavailable cupy
Visualization (optional)
ββ pyvista 0.41.1 (OpenGL 4.1 INTEL-18.7.4 via Intel(R) Irisβ’ Plus Graphics 645)
ββ pyvistaqt 0.0.0
ββ vtk 9.2.6
ββ qtpy 2.4.0 (PyQt5=5.15.8)
ββ ipympl 0.9.3
2024-01-10 14:22:39,181 - OpenGL.acceleratesupport - INFO - No OpenGL_accelerate module loaded: No module named βOpenGL_accelerateβ
ββ pyqtgraph 0.13.3
ββ mne-qt-browser 0.5.2
ββ ipywidgets 8.1.0
ββ trame_client 2.11.2
ββ trame_server 2.11.7
ββ trame_vtk 2.5.8
ββ trame_vuetify 2.3.1
Ecosystem (optional)
ββ mne-bids 0.13
ββ mne-nirs 0.5.0
ββ mne-features 0.3
ββ mne-connectivity 0.5.0
ββ mne-icalabel 0.4
ββ mne-bids-pipeline 1.4.0
cbrnr
(Clemens Brunner)
January 10, 2024, 2:59pm
6
The latest MNE version is 1.6.1, can you upgrade and see if that solves the issue?
richard
(Richard HΓΆchenberger)
January 10, 2024, 3:08pm
7
I think this parameter was added in 1.6
1 Like
cbrnr
(Clemens Brunner)
January 10, 2024, 3:27pm
8
BTW, if you want to stick with an older MNE version, you can switch the website to that version:
The tutorial/example for this version should then work for you. But Iβd recommend upgrading to the latest version if you can.
2 Likes
MikeW
(Mxw976)
January 10, 2024, 3:51pm
9
I upgraded and the issue was solved! Thank you!