# \<maybeencodingerror\>

**URL:** <https://mne.discourse.group/t/maybeencodingerror/1076>\
**Category:** Mailing List Archive (read-only)\
**Tags:** list-archive\
**Created:** [September 1, 2016, 10:37am UTC](https://mne.discourse.group/t/maybeencodingerror/1076 "2016-09-01T10:37:46Z")\
**Posts on this page:** 4\
**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, 2016, 10:37am UTC](https://mne.discourse.group/t/maybeencodingerror/1076/1 "2016-09-01T10:37:46Z")

</div>

Dear list

I have been trying to reconstruct my epochs based on the induced power  
using \<mne.minimum\_norm.source\_induced\_power\>.

I get a \<maybeencodingerror\> from running this command. I cannot figure  
out whether this is a user error or a bug/problem. I have been able to  
use the exact same code on other files though with shorter epochs (-250  
to 750 ms)

mne.minimum\_norm.time\_frequency.source\_band\_induced\_power(  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;to\_reconstruct[trial\_type], ## epochs are  
from -500 to 1500 ms  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;inverse\_operator, mu\_bands, method=method,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;n\_cycles=3, n\_jobs=16)

Preparing the inverse operator for use...  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Scaled noise and source covariance from nave = 1 to nave = 1  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Created the regularized inverter  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The projection vectors do not apply to these channels.  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Created the whitener using a full noise covariance matrix (0 small  
eigenvalues omitted)  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Computing noise-normalization factors (dSPM)...  
[done]  
Picked 306 channels from the data  
Computing inverse...  
(eigenleads need to be weighted)...  
Reducing data rank to 306  
Computing source power ...  
Traceback (most recent call last):

&nbsp;&nbsp;&nbsp;File "\<ipython-input-4-50e967105495\>", line 1, in \<module\>  
runfile('/home/lau/analyses/pam\_oddball/scripts/absence/python/absence\_analysis\_v2.py',  
wdir='/home/lau/analyses/pam\_oddball/scripts/absence/python')

&nbsp;&nbsp;&nbsp;File  
"/home/lau/anaconda2/lib/python2.7/site-packages/spyderlib/widgets/externalshell/sitecustomize.py",  
line 685, in runfile  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;execfile(filename, namespace)

&nbsp;&nbsp;&nbsp;File  
"/home/lau/anaconda2/lib/python2.7/site-packages/spyderlib/widgets/externalshell/sitecustomize.py",  
line 78, in execfile  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;builtins.execfile(filename, \*where)

&nbsp;&nbsp;&nbsp;File  
"/home/lau/analyses/pam\_oddball/scripts/absence/python/absence\_analysis\_v2.py",  
line 378, in \<module\>  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mu\_bands)

&nbsp;&nbsp;&nbsp;File "absence\_functions\_v2.py", line 835, in source\_estimate  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;n\_cycles=7, n\_jobs=4)

&nbsp;&nbsp;&nbsp;File "\<string\>", line 2, in source\_band\_induced\_power

&nbsp;&nbsp;&nbsp;File "/home/lau/anaconda2/lib/python2.7/site-packages/mne/utils.py",  
line 628, in verbose  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return function(\*args, \*\*kwargs)

&nbsp;&nbsp;&nbsp;File  
"/home/lau/anaconda2/lib/python2.7/site-packages/mne/minimum\_norm/time\_frequency.py",  
line 129, in source\_band\_induced\_power  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;prepared=prepared)

&nbsp;&nbsp;&nbsp;File "\<string\>", line 2, in \_source\_induced\_power

&nbsp;&nbsp;&nbsp;File "/home/lau/anaconda2/lib/python2.7/site-packages/mne/utils.py",  
line 628, in verbose  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return function(\*args, \*\*kwargs)

&nbsp;&nbsp;&nbsp;File  
"/home/lau/anaconda2/lib/python2.7/site-packages/mne/minimum\_norm/time\_frequency.py",  
line 275, in \_source\_induced\_power  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for data in np.array\_split(epochs\_data, n\_jobs))

&nbsp;&nbsp;&nbsp;File  
"/home/lau/anaconda2/lib/python2.7/site-packages/sklearn/externals/joblib/parallel.py",  
line 666, in \_\_call\_\_  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;self.retrieve()

&nbsp;&nbsp;&nbsp;File  
"/home/lau/anaconda2/lib/python2.7/site-packages/sklearn/externals/joblib/parallel.py",  
line 518, in retrieve  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;self.\_output.append(job.get())

&nbsp;&nbsp;&nbsp;File "/home/lau/anaconda2/lib/python2.7/multiprocessing/pool.py",  
line 567, in get  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;raise self.\_value

\*MaybeEncodingError\*: Error sending result: '(array([[[  
4.33156061e-20, 4.39577027e-20, 4.45972043e-20, ...,

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

---

<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, 2016, 10:45am UTC](https://mne.discourse.group/t/maybeencodingerror/1076/2 "2016-09-01T10:45:37Z")

</div>

quick update - I suspected that it might be due to parallel processing  
(n\_jobs=16), but I get the same error with n\_jobs=1

I use mne 0.12 by the way

---

<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, 2016, 1:35pm UTC](https://mne.discourse.group/t/maybeencodingerror/1076/3 "2016-09-01T13:35:36Z")

</div>

can you share the tracback with n\_jobs=1? it should be more readable.

A

---

<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 9, 2016, 7:46am UTC](https://mne.discourse.group/t/maybeencodingerror/1076/4 "2016-09-09T07:46:39Z")

</div>

It might be an n\_jobs problem - didn't get the error with n\_jobs=1
