Closed devadidev closed 9 years ago
Have you tried with ipython instead of python? Check your mne version inside ipython:
import mne
print mne.__version__
looks related to changes in PR https://github.com/mne-tools/mne-python/pull/2452
@kingjr, the version returned is as I quoted in the original, I tried with iPython and got a different (qt related?) error. I'll explore this further and update here if I'm able to configure and run it successfully also @mainakjas thanks for linking the issue, I'll go through that update here if it's related to that.
iPython Error: computing connectivity for epoch 58 computing connectivity for epoch 59 computing connectivity for epoch 60 [Connectivity computation done] Computing PSI from estimated Coherency
ValueError Traceback (most recent call last)
/home/devanka/projects/mneruns/programs/plot_mne_inverse_psi_visual.py in
/home/devanka/projects/mneruns/programs/src/mne/mne/source_estimate.pyc in plot(self, subject, surface, hemi, colormap, time_label, smoothing_steps, transparent, alpha, time_viewer, config_opts, subjects_dir, figure, views, colorbar, clim) 1362 subjects_dir=subjects_dir, figure=figure, 1363 views=views, colorbar=colorbar, -> 1364 clim=clim) 1365 return brain 1366
/home/devanka/projects/mneruns/programs/src/mne/mne/viz/_3d.pyc in plot_source_estimates(stc, subject, surface, hemi, colormap, time_label, smoothing_steps, transparent, alpha, time_viewer, config_opts, subjects_dir, figure, views, colorbar, clim) 519 A instance of surfer.viz.Brain from PySurfer. 520 """ --> 521 from surfer import Brain, TimeViewer 522 config_opts = _handle_default('config_opts', config_opts) 523
/home/devanka/anaconda/envs/mnemeeg/lib/python2.7/site-packages/surfer/init.py in
/home/devanka/anaconda/envs/mnemeeg/lib/python2.7/site-packages/surfer/viz.py in
/home/devanka/anaconda/envs/mnemeeg/lib/python2.7/site-packages/mayavi/mlab.py in
/home/devanka/anaconda/envs/mnemeeg/lib/python2.7/site-packages/mayavi/tools/camera.py in
/home/devanka/anaconda/envs/mnemeeg/lib/python2.7/site-packages/mayavi/tools/engine_manager.py in
/home/devanka/anaconda/envs/mnemeeg/lib/python2.7/site-packages/mayavi/preferences/api.py in
/home/devanka/anaconda/envs/mnemeeg/lib/python2.7/site-packages/mayavi/preferences/preference_manager.py in
/home/devanka/anaconda/envs/mnemeeg/lib/python2.7/site-packages/traitsui/api.py in
/home/devanka/anaconda/envs/mnemeeg/lib/python2.7/site-packages/traitsui/editors/init.py in
/home/devanka/anaconda/envs/mnemeeg/lib/python2.7/site-packages/traitsui/editors/api.py in
/home/devanka/anaconda/envs/mnemeeg/lib/python2.7/site-packages/traitsui/editors/code_editor.py in
/home/devanka/anaconda/envs/mnemeeg/lib/python2.7/site-packages/traitsui/editors/code_editor.py in ToolkitEditorFactory() 46 47 # Background color for marking lines ---> 48 mark_color = Color( 0xECE9D8 ) 49 50 # Object trait containing the currently selected line (optional)
/home/devanka/anaconda/envs/mnemeeg/lib/python2.7/site-packages/traits/traits.pyc in call(self, _args, _metadata) 485 486 def call ( self, _args, _metadata ): --> 487 return self.maker_function( _args, *_metadata ) 488 489 class TraitImportError ( TraitFactory ):
/home/devanka/anaconda/envs/mnemeeg/lib/python2.7/site-packages/traits/traits.pyc in Color(_args, _metadata) 1189 from traitsui.toolkit_traits import ColorTrait 1190 -> 1191 return ColorTrait( _args, _metadata ) 1192 1193 Color = TraitFactory( Color )
/home/devanka/anaconda/envs/mnemeeg/lib/python2.7/site-packages/traitsui/toolkit_traits.pyc in ColorTrait(_args, _traits) 5 6 def ColorTrait ( _args, _traits ): ----> 7 return toolkit().color_trait( _args, _traits ) 8 9 def RGBColorTrait ( _args, _traits ):
/home/devanka/anaconda/envs/mnemeeg/lib/python2.7/site-packages/traitsui/toolkit.pyc in toolkit(*toolkits) 115 for toolkit_name in toolkits: 116 try: --> 117 _toolkit = _import_toolkit( toolkit_name ) 118 119 # In case we have just decided on a toolkit, tell everybody else:
/home/devanka/anaconda/envs/mnemeeg/lib/python2.7/site-packages/traitsui/toolkit.pyc in _import_toolkit(name) 49 50 def _import_toolkit ( name ): ---> 51 return import( name, globals=globals(), level=1 ).toolkit 52 53
/home/devanka/anaconda/envs/mnemeeg/lib/python2.7/site-packages/traitsui/qt4/init.py in
/home/devanka/anaconda/envs/mnemeeg/lib/python2.7/site-packages/pyface/qt/init.py in
/home/devanka/anaconda/envs/mnemeeg/lib/python2.7/site-packages/pyface/qt/init.py in prepare_pyqt4() 15 # Set PySide compatible APIs. 16 import sip ---> 17 sip.setapi('QString', 2) 18 sip.setapi('QVariant', 2) 19
ValueError: API 'QString' has already been set to version 1
@devadidev for the error, have a look here: https://pysurfer.github.io/install.html. It should fix it
@mainakjas, thanks that fixed the iPython qt error but back to the RunTime one:
/home/devanka/projects/mneruns/programs/src/mne/mne/io/meas_info.pyc in _check_consistency(self) 217 ch_1 != ch_2 for ch_1, ch_2 in zip(self['ch_names'], chs)) or \ 218 self['nchan'] != len(chs): --> 219 raise RuntimeError('info channel name inconsistency detected, ' 220 'please notify mne-python developers') 221 # make sure we have the proper datatypes
RuntimeError: info channel name inconsistency detected, please notify mne-python developers
plot_decoding_csp_eeg.py runs fine for me in master. Are you using master?
what version of python are you using?
where did you get the example from? Did you download it from the website or github?
it runs fine for me too
Ah ic now, I downloaded from the website (http://martinos.org/mne/stable/auto_examples/decoding/plot_decoding_csp_eeg.html) and there are some diff with GH version of the code, which runs fine for me in master now.
(mnemeeg)➜ programs diff plot_decoding_csp_eeg_old.py plot_decoding_csp_eeg_github.py 5d4 < 8d6 < 10d7 < 13d9 < 17d12 < 21d15 < 34,36c28,30 < from mne import Epochs, pick_types < from mne.io import concatenate_raws
from mne import Epochs, pick_types, find_events from mne.channels import read_layout from mne.io import concatenate_raws, read_raw_edf 38d31 < from mne.event import find_events 40d32 < from mne.channels import read_layout 58,59c50,51 < # strip channel names
< raw.info['ch_names'] = [chn.strip('.') for chn in raw.info['ch_names']]
strip channel names of "." characters
raw.rename_channels(lambda x: x.strip('.'))
ok please close then.
Hi, I'm new to MNE and Python and I've been trying to run the example plot_decoding_csp_eeg.py on my Ubuntu 14.04, Anaconda with conda 3.17.0 and MNE: 0.10.dev0. I'm getting the following error and wondering if Im missing something trivial! Thanks
(mnemeeg)➜ programs : python plot_decoding_csp_eeg.py
Motor imagery decoding from EEG data using the Common Spatial Pattern (CSP)
Decoding of motor imagery applied to EEG data decomposed using CSP. Here the classifier is applied to features extracted on CSP filtered signals.
See http://en.wikipedia.org/wiki/Common_spatial_pattern and [1]
The EEGBCI dataset is documented in [2] The data set is available at PhysioNet [3]
[1] Zoltan J. Koles. The quantitative extraction and topographic mapping of the abnormal components in the clinical EEG. Electroencephalography and Clinical Neurophysiology, 79(6):440--447, December 1991.
[2] Schalk, G., McFarland, D.J., Hinterberger, T., Birbaumer, N., Wolpaw, J.R. (2004) BCI2000: A General-Purpose Brain-Computer Interface (BCI) System. IEEE TBME 51(6):1034-1043
[3] Goldberger AL, Amaral LAN, Glass L, Hausdorff JM, Ivanov PCh, Mark RG, Mietus JE, Moody GB, Peng C-K, Stanley HE. (2000) PhysioBank, PhysioToolkit, and PhysioNet: Components of a New Research Resource for Complex Physiologic Signals. Circulation 101(23):e215-e220
Extracting edf Parameters from /home/devanka/src/examples/MNE-eegbci-data/physiobank/database/eegmmidb/S001/S001R06.edf... Setting channel info structure... Creating Raw.info structure... Reading 0 ... 19999 = 0.000 ... 124.994 secs... [done] Ready. Extracting edf Parameters from /home/devanka/src/examples/MNE-eegbci-data/physiobank/database/eegmmidb/S001/S001R10.edf... Setting channel info structure... Creating Raw.info structure... Reading 0 ... 19999 = 0.000 ... 124.994 secs... [done] Ready. Extracting edf Parameters from /home/devanka/src/examples/MNE-eegbci-data/physiobank/database/eegmmidb/S001/S001R14.edf... Setting channel info structure... Creating Raw.info structure... Reading 0 ... 19999 = 0.000 ... 124.994 secs... [done] Ready. Traceback (most recent call last): File "plot_decoding_csp_eeg.py", line 62, in
raw.filter(7., 30., method='iir')
File "", line 2, in filter
File "/home/devanka/projects/mneruns/programs/src/mne/mne/utils.py", line 540, in verbose
return function(_args, *_kwargs)
File "/home/devanka/projects/mneruns/programs/src/mne/mne/io/base.py", line 804, in filter
picks = pick_types(self.info, exclude=[], **pick_parameters)
File "/home/devanka/projects/mneruns/programs/src/mne/mne/io/pick.py", line 205, in pick_types
info._check_consistency()
File "/home/devanka/projects/mneruns/programs/src/mne/mne/io/meas_info.py", line 219, in _check_consistency
raise RuntimeError('info channel name inconsistency detected, '
RuntimeError: info channel name inconsistency detected, please notify mne-python developers
(mnemeeg)➜ programs python plot_decoding_csp_eeg.py
Motor imagery decoding from EEG data using the Common Spatial Pattern (CSP)
Decoding of motor imagery applied to EEG data decomposed using CSP. Here the classifier is applied to features extracted on CSP filtered signals.
See http://en.wikipedia.org/wiki/Common_spatial_pattern and [1]
The EEGBCI dataset is documented in [2] The data set is available at PhysioNet [3]
[1] Zoltan J. Koles. The quantitative extraction and topographic mapping of the abnormal components in the clinical EEG. Electroencephalography and Clinical Neurophysiology, 79(6):440--447, December 1991.
[2] Schalk, G., McFarland, D.J., Hinterberger, T., Birbaumer, N., Wolpaw, J.R. (2004) BCI2000: A General-Purpose Brain-Computer Interface (BCI) System. IEEE TBME 51(6):1034-1043
[3] Goldberger AL, Amaral LAN, Glass L, Hausdorff JM, Ivanov PCh, Mark RG, Mietus JE, Moody GB, Peng C-K, Stanley HE. (2000) PhysioBank, PhysioToolkit, and PhysioNet: Components of a New Research Resource for Complex Physiologic Signals. Circulation 101(23):e215-e220
Extracting edf Parameters from /home/devanka/src/examples/MNE-eegbci-data/physiobank/database/eegmmidb/S001/S001R06.edf... Setting channel info structure... Creating Raw.info structure... Reading 0 ... 19999 = 0.000 ... 124.994 secs... [done] Ready. Extracting edf Parameters from /home/devanka/src/examples/MNE-eegbci-data/physiobank/database/eegmmidb/S001/S001R10.edf... Setting channel info structure... Creating Raw.info structure... Reading 0 ... 19999 = 0.000 ... 124.994 secs... [done] Ready. Extracting edf Parameters from /home/devanka/src/examples/MNE-eegbci-data/physiobank/database/eegmmidb/S001/S001R14.edf... Setting channel info structure... Creating Raw.info structure... Reading 0 ... 19999 = 0.000 ... 124.994 secs... [done] Ready. Traceback (most recent call last): File "plot_decoding_csp_eeg.py", line 62, in
raw.filter(7., 30., method='iir')
File "", line 2, in filter
File "/home/devanka/projects/mneruns/programs/src/mne/mne/utils.py", line 540, in verbose
return function(_args, *_kwargs)
File "/home/devanka/projects/mneruns/programs/src/mne/mne/io/base.py", line 804, in filter
picks = pick_types(self.info, exclude=[], **pick_parameters)
File "/home/devanka/projects/mneruns/programs/src/mne/mne/io/pick.py", line 205, in pick_types
info._check_consistency()
File "/home/devanka/projects/mneruns/programs/src/mne/mne/io/meas_info.py", line 219, in _check_consistency
raise RuntimeError('info channel name inconsistency detected, '
RuntimeError: info channel name inconsistency detected, please notify mne-python developers