# Error in combining edf files

**URL:** https://mne.discourse.group/t/error-in-combining-edf-files/1380
**Category:** Mailing List Archive (read-only)
**Tags:** list-archive
**Created:** [December 4, 2017, 1:51am UTC](https://mne.discourse.group/t/error-in-combining-edf-files/1380 "2017-12-04T01:51:36Z")
**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: [December 4, 2017, 1:51am UTC](https://mne.discourse.group/t/error-in-combining-edf-files/1380/1 "2017-12-04T01:51:36Z")

</div>

Hi,

I am trying to combine two edf files with the following code,

raw0 = mne.io.read\_raw\_edf('file1', preload=True)  
raw1 = mne.io.read\_raw\_edf('file2', preload=True)

raw = raw0.append(raw1)

When I try to plot 19th channel with the following code,

data = raw[:, :][0]  
plt.plot(data[19])  
plt.show()

Following set of error comes

TypeError Traceback (most recent call  
last)\<ipython-input-214-345e58904e3a\> in \<module\>()----\> 1 data =  
raw[:, :][0] 2 plt.plot(data[19]) 3 plt.show()  
TypeError: 'NoneType' object is not subscriptable

What is wrong with my code?

?  
\<[https://mailtrack.io/](https://mailtrack.io/)\> Sent with Mailtrack  
\<[https://chrome.google.com/webstore/detail/mailtrack-for-gmail-inbox/ndnaehgpjlnokgebbaldlmgkapkpjkkb?utm\_source=gmail&utm\_medium=signature&utm\_campaign=signaturevirality](https://chrome.google.com/webstore/detail/mailtrack-for-gmail-inbox/ndnaehgpjlnokgebbaldlmgkapkpjkkb?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality)\>  
-------------- next part --------------  
An HTML attachment was scrubbed...  
URL: [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20171204/5d816697/attachment.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20171204/5d816697/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: [December 4, 2017, 2:39am UTC](https://mne.discourse.group/t/error-in-combining-edf-files/1380/2 "2017-12-04T02:39:32Z")

</div>

Hi Senaka,

The append method is an in-place operation so when you assign it to raw,  
there is no returned value and therefore it is then mapped to None.

To remedy it, just try `raw0.append(raw1)` and proceed with raw0 for  
following steps.

HTH,
