# ImportError: cannot import name sigtools

**URL:** <https://mne.discourse.group/t/importerror-cannot-import-name-sigtools/812>\
**Category:** Mailing List Archive (read-only)\
**Tags:** list-archive\
**Created:** [September 1, 2014, 9:37am UTC](https://mne.discourse.group/t/importerror-cannot-import-name-sigtools/812 "2014-09-01T09:37:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [September 1, 2014, 9:37am UTC](https://mne.discourse.group/t/importerror-cannot-import-name-sigtools/812/1 "2014-09-01T09:37:05Z")

</div>

Hi Maria,

I am forwarding this email to the mailing list since this is a new issue  
than the one you had previously posted. There are more people on the  
mailing list who can answer your questions and you can expect a faster  
response. In the future, can you try to share a small gist (  
[https://gist.github.com/](https://gist.github.com/)), not more than 15-20 lines to reproduce the  
problem using the sample dataset? Here is an example to reproduce this  
problem you had: [https://gist.github.com/mainakjas/966714622a73eaeb9b6f](https://gist.github.com/mainakjas/966714622a73eaeb9b6f).

The issue is that picks is a numpy array but evoked.pick\_channels expects a  
list of strings. You can do something like:

evoked\_clean.pick\_channels([evoked\_clean.info['ch\_names'][p] for p in  
picks\_good])

to solve your problem. Does this work?

Mainak

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [September 2, 2014, 6:06am UTC](https://mne.discourse.group/t/importerror-cannot-import-name-sigtools/812/2 "2014-09-02T06:06:20Z")

</div>

Hi Mainak,

Many thanks! This works.

Regards,  
Maria

2014-09-01 12:37 GMT+03:00 Mainak Jas \<mainakjas at gmail.com\>:

> Hi Maria,
> 
> I am forwarding this email to the mailing list since this is a new issue  
> than the one you had previously posted. There are more people on the  
> mailing list who can answer your questions and you can expect a faster  
> response. In the future, can you try to share a small gist (  
> [https://gist.github.com/](https://gist.github.com/)), not more than 15-20 lines to reproduce the  
> problem using the sample dataset? Here is an example to reproduce this  
> problem you had: [https://gist.github.com/mainakjas/966714622a73eaeb9b6f](https://gist.github.com/mainakjas/966714622a73eaeb9b6f).
> 
> The issue is that picks is a numpy array but evoked.pick\_channels expects  
> a list of strings. You can do something like:
> 
> evoked\_clean.pick\_channels([evoked\_clean.info['ch\_names'][p] for p in  
> picks\_good])
> 
> to solve your problem. Does this work?
> 
> Mainak
> 
> > Hi again Mainak,
> > 
> > I managed to solve that import error already by closing all terminals and  
> > logging off. The figures are also saved correctly now and the events are  
> > printed in a file. Many thanks for your advice!
> > 
> > However, there is still one problem, I haven't managed to solve. I wonder  
> > if you have any ideas how it could be solved? I get the following error:
> > 
> > ValueError Traceback (most recent call  
> > last)  
> > /usr/lib/python2.7/dist-packages/IPython/utils/py3compat.pyc in  
> > execfile(fname, \*where)  
> > &nbsp;&nbsp;&nbsp;&nbsp;173 else:  
> > &nbsp;&nbsp;&nbsp;&nbsp;174 filename = fname  
> > --\> 175 \_\_builtin\_\_.execfile(filename, \*where)
> > 
> > /scratch/braindata/mhhakone/intell/scripts/evoke\_and\_do\_ica.py in  
> > \<module\>()  
> > &nbsp;&nbsp;&nbsp;&nbsp;141 filename =subject+session+file\_end  
> > &nbsp;&nbsp;&nbsp;&nbsp;142 picks\_good = mne.pick\_types(evoked\_clean.info, meg=True,  
> > eeg=False, eog=True, ecg=False, stim=False, exclude='bads')  
> > --\> 143 evoked\_clean.pick\_channels(picks\_good)  
> > &nbsp;&nbsp;&nbsp;&nbsp;144 evoked\_clean.save(filename)  
> > &nbsp;&nbsp;&nbsp;&nbsp;145
> > 
> > /home/mhhakone/env/src/mne/mne/channels.pyc in pick\_channels(self,  
> > ch\_names, copy)  
> > &nbsp;&nbsp;&nbsp;&nbsp;147  
> > &nbsp;&nbsp;&nbsp;&nbsp;148 idx = [inst.ch\_names.index(c) for c in ch\_names if c in  
> > inst.ch\_names]  
> > --\> 149 inst.\_pick\_drop\_channels(idx)  
> > &nbsp;&nbsp;&nbsp;&nbsp;150  
> > &nbsp;&nbsp;&nbsp;&nbsp;151 return inst
> > 
> > /home/mhhakone/env/src/mne/mne/channels.pyc in \_pick\_drop\_channels(self,  
> > idx)  
> > &nbsp;&nbsp;&nbsp;&nbsp;189 self.cals = self.cals[idx]  
> > &nbsp;&nbsp;&nbsp;&nbsp;190  
> > --\> 191 self.info = pick\_info(self.info, idx, copy=False)  
> > &nbsp;&nbsp;&nbsp;&nbsp;192  
> > &nbsp;&nbsp;&nbsp;&nbsp;193 if inst\_has('\_projector'):
> > 
> > /home/mhhakone/env/src/mne/mne/io/pick.pyc in pick\_info(info, sel, copy)  
> > &nbsp;&nbsp;&nbsp;&nbsp;285  
> > &nbsp;&nbsp;&nbsp;&nbsp;286 if len(sel) == 0:  
> > --\> 287 raise ValueError('Warning : No channels match the  
> > selection.')  
> > &nbsp;&nbsp;&nbsp;&nbsp;288  
> > &nbsp;&nbsp;&nbsp;&nbsp;289 info['chs'] = [info['chs'][k] for k in sel]
> > 
> > ValueError: Warning : No channels match the selection.
> > 
> > I don't really understand how it is possible that no channels match the  
> > selection if picks\_good are calculated from evoked\_clean?
> > 
> > picks\_good and evoked\_clean are as follows:
> > 
> > In [4]: picks\_good  
> > Out[4]:  
> > array([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77,  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103,  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129,  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142,  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155,  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168,  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181,  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194,  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207,  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220,  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233,  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246,  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259,  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272,  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285,  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298,  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;299, 300, 301, 302, 303, 304, 305])
> > 
> > &nbsp;&nbsp;In [5]: evoked\_clean  
> > Out[5]: \<Evoked | comment : 'Unknown', time : [-0.099994, 0.999936],  
> > n\_epochs : 148, n\_channels x n\_times : 306 x 1321\>
> > 
> > Thanks already in advance if you have yet time to help!
> > 
> > Regards,  
> > Maria  
> > \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> > L?hett?j?: Hakonen Maria  
> > L?hetetty: 30. elokuuta 2014 10:02  
> > Vastaanottaja: mainakjas at gmail.com  
> > Aihe: ImportError: cannot import name sigtools
> > 
> > Hi,
> > 
> > I have tried to run the MEG preprocessing script but import mne gives the  
> > error:
> > 
> > ImportError Traceback (most recent call  
> > last)  
> > /scratch/braindata/mhhakone/intell/scripts/\<ipython-input-12-39fc8b1a8697\>  
> > in \<module\>()  
> > ----\> 1 import mne
> > 
> > /home/mhhakone/env/src/mne/mne/\_\_init\_\_.py in \<module\>()  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;8 get\_config, get\_config\_path, set\_cache\_dir,  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;9 set\_memmap\_min\_size)  
> > ---\> 10 from .io.pick import (pick\_types, pick\_channels,  
> > pick\_types\_evoked,  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;11 pick\_channels\_regexp, pick\_channels\_forward,  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;12 pick\_types\_forward, pick\_channels\_cov,
> > 
> > /home/mhhakone/env/src/mne/mne/io/\_\_init\_\_.py in \<module\>()  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;6 # License: BSD (3-clause)
> > 
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;7  
> > ----\> 8 from .open import fiff\_open, show\_fiff, \_fiff\_get\_fid  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;9 from .meas\_info import read\_fiducials, write\_fiducials,  
> > read\_info, write\_info  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;10
> > 
> > /home/mhhakone/env/src/mne/mne/io/open.py in \<module\>()  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;10  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;11 from .tag import read\_tag\_info, read\_tag, read\_big, Tag  
> > ---\> 12 from .tree import make\_dir\_tree  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;13 from .constants import FIFF  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;14 from ..utils import logger, verbose
> > 
> > /home/mhhakone/env/src/mne/mne/io/tree.py in \<module\>()  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;10 from .tag import Tag  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;11 from .tag import read\_tag  
> > ---\> 12 from .write import write\_id, start\_block, end\_block, \_write  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;13 from ..utils import logger, verbose  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;14
> > 
> > /home/mhhakone/env/src/mne/mne/io/write.py in \<module\>()  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;15 from ..utils import logger  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;16 from ..externals.jdcal import jcal2jd  
> > ---\> 17 from ..fixes import gzip\_open  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;18  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;19
> > 
> > /home/mhhakone/env/src/mne/mne/fixes.py in \<module\>()  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;24 from numpy.fft import irfft  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;25 from nose.tools import assert\_true  
> > ---\> 26 from scipy.signal import filtfilt as sp\_filtfilt  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;27 from distutils.version import LooseVersion  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;28 from functools import partial
> > 
> > /home/mhhakone/env/local/lib/python2.7/site-packages/scipy/signal/\_\_init\_\_.py  
> > in \<module\>()  
> > &nbsp;&nbsp;&nbsp;&nbsp;230 from \_\_future\_\_ import division, print\_function, absolute\_import  
> > &nbsp;&nbsp;&nbsp;&nbsp;231  
> > --\> 232 from . import sigtools  
> > &nbsp;&nbsp;&nbsp;&nbsp;233 from .waveforms import \*  
> > &nbsp;&nbsp;&nbsp;&nbsp;234
> > 
> > ImportError: cannot import name sigtools
> > 
> > I wonder if you know what could cause this error? I haven't got it  
> > before. Could it be relatrd to the Python version I have. Now I have the  
> > following version:
> > 
> > In [18]: sys.version  
> > Out[18]: '2.7.3 (default, Feb 27 2014, 19:58:35) \n[GCC 4.6.3]'
> > 
> > Thanks,  
> > Maria
> 
> \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> Mne\_analysis mailing list  
> Mne\_analysis at nmr.mgh.harvard.edu  
> [Mne\_analysis Info Page](https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis)
> 
> The information in this e-mail is intended only for the person to whom it  
> is  
> addressed. If you believe this e-mail was sent to you in error and the  
> e-mail  
> contains patient information, please contact the Partners Compliance  
> HelpLine at  
> [MyComplianceReport.com: Compliance and Ethics Reporting](http://www.partners.org/complianceline) . If the e-mail was sent to you in  
> error  
> but does not contain patient information, please contact the sender and  
> properly  
> dispose of the e-mail.

-------------- next part --------------  
An HTML attachment was scrubbed...  
URL: [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20140902/006f1c53/attachment.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20140902/006f1c53/attachment.html)
