<div dir="ltr"><div><div><div>Hi Senaka,<br><br></div>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.<br><br></div>To remedy it, just try  `raw0.append(raw1)` and proceed with raw0 for following steps.<br><br></div>HTH,<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Dec 3, 2017 at 5:51 PM, Senaka Amarakeerthi <span dir="ltr">&lt;<a href="mailto:senakahks@gmail.com" target="_blank">senakahks@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><img class="m_6842896399435879972mailtrack-img" alt="" style="display:flex" src="https://mailtrack.io/trace/mail/31837739b38fcaccd266574dc9fcabe3106acd94.png?u=648108" height="0" width="0"><div>Hi,</div><div><br></div><div>I am trying to combine two edf files with the following code,</div><div><br></div><div>raw0 = mne.io.read_raw_edf(&#39;file1&#39;, preload=True)</div><div>raw1 = mne.io.read_raw_edf(&#39;file2&#39;, preload=True)</div><div><br></div><div>raw = raw0.append(raw1)</div><div><br></div><div>When I try to plot 19th channel with the following code,</div><div><br></div><div><div>data = raw[:, :][0]</div><div>plt.plot(data[19])</div><div>plt.show()</div></div><div><br></div><div>Following set of error comes</div><div><br></div><pre style="box-sizing:border-box;overflow:auto;padding:0px;margin-top:0px;margin-bottom:0px;line-height:inherit;word-break:break-all;word-wrap:break-word;color:rgb(0,0,0);border:0px;border-radius:0px;white-space:pre-wrap;vertical-align:baseline"><span class="m_6842896399435879972gmail-ansi-red-fg" style="box-sizing:border-box;color:rgb(231,92,88)">TypeError</span>                                 Traceback (most recent call last)
<span class="m_6842896399435879972gmail-ansi-green-fg" style="box-sizing:border-box;color:rgb(0,162,80)">&lt;ipython-input-214-<wbr>345e58904e3a&gt;</span> in <span class="m_6842896399435879972gmail-ansi-cyan-fg" style="box-sizing:border-box;color:rgb(96,198,200)">&lt;module&gt;</span><span class="m_6842896399435879972gmail-ansi-blue-fg" style="box-sizing:border-box;color:rgb(32,143,251)">()</span>
<span class="m_6842896399435879972gmail-ansi-green-fg" style="box-sizing:border-box;color:rgb(0,162,80)">----&gt; 1</span><span class="m_6842896399435879972gmail-ansi-red-fg" style="box-sizing:border-box;color:rgb(231,92,88)"> </span>data <span class="m_6842896399435879972gmail-ansi-blue-fg" style="box-sizing:border-box;color:rgb(32,143,251)">=</span> raw<span class="m_6842896399435879972gmail-ansi-blue-fg" style="box-sizing:border-box;color:rgb(32,143,251)">[</span><span class="m_6842896399435879972gmail-ansi-blue-fg" style="box-sizing:border-box;color:rgb(32,143,251)">:</span><span class="m_6842896399435879972gmail-ansi-blue-fg" style="box-sizing:border-box;color:rgb(32,143,251)">,</span> <span class="m_6842896399435879972gmail-ansi-blue-fg" style="box-sizing:border-box;color:rgb(32,143,251)">:</span><span class="m_6842896399435879972gmail-ansi-blue-fg" style="box-sizing:border-box;color:rgb(32,143,251)">]</span><span class="m_6842896399435879972gmail-ansi-blue-fg" style="box-sizing:border-box;color:rgb(32,143,251)">[</span><span class="m_6842896399435879972gmail-ansi-cyan-fg" style="box-sizing:border-box;color:rgb(96,198,200)">0</span><span class="m_6842896399435879972gmail-ansi-blue-fg" style="box-sizing:border-box;color:rgb(32,143,251)">]</span>
<span class="m_6842896399435879972gmail-ansi-green-intense-fg m_6842896399435879972gmail-ansi-bold" style="box-sizing:border-box;color:rgb(0,116,39);font-weight:bold">      2</span> plt<span class="m_6842896399435879972gmail-ansi-blue-fg" style="box-sizing:border-box;color:rgb(32,143,251)">.</span>plot<span class="m_6842896399435879972gmail-ansi-blue-fg" style="box-sizing:border-box;color:rgb(32,143,251)">(</span>data<span class="m_6842896399435879972gmail-ansi-blue-fg" style="box-sizing:border-box;color:rgb(32,143,251)">[</span><span class="m_6842896399435879972gmail-ansi-cyan-fg" style="box-sizing:border-box;color:rgb(96,198,200)">19</span><span class="m_6842896399435879972gmail-ansi-blue-fg" style="box-sizing:border-box;color:rgb(32,143,251)">]</span><span class="m_6842896399435879972gmail-ansi-blue-fg" style="box-sizing:border-box;color:rgb(32,143,251)">)</span>
<span class="m_6842896399435879972gmail-ansi-green-intense-fg m_6842896399435879972gmail-ansi-bold" style="box-sizing:border-box;color:rgb(0,116,39);font-weight:bold">      3</span> plt<span class="m_6842896399435879972gmail-ansi-blue-fg" style="box-sizing:border-box;color:rgb(32,143,251)">.</span>show<span class="m_6842896399435879972gmail-ansi-blue-fg" style="box-sizing:border-box;color:rgb(32,143,251)">(</span><span class="m_6842896399435879972gmail-ansi-blue-fg" style="box-sizing:border-box;color:rgb(32,143,251)">)</span>

<span class="m_6842896399435879972gmail-ansi-red-fg" style="box-sizing:border-box;color:rgb(231,92,88)">TypeError</span>: &#39;NoneType&#39; object is not subscriptable</pre><pre style="box-sizing:border-box;overflow:auto;padding:0px;margin-top:0px;margin-bottom:0px;line-height:inherit;word-break:break-all;word-wrap:break-word;color:rgb(0,0,0);border:0px;border-radius:0px;white-space:pre-wrap;vertical-align:baseline"><br></pre><pre style="box-sizing:border-box;overflow:auto;padding:0px;margin-top:0px;margin-bottom:0px;line-height:inherit;word-break:break-all;word-wrap:break-word;color:rgb(0,0,0);border:0px;border-radius:0px;white-space:pre-wrap;vertical-align:baseline"><br></pre><pre style="box-sizing:border-box;overflow:auto;padding:0px;margin-top:0px;margin-bottom:0px;line-height:inherit;word-break:break-all;word-wrap:break-word;color:rgb(0,0,0);border:0px;border-radius:0px;white-space:pre-wrap;vertical-align:baseline">What is wrong with my code?</pre> <br><br><br>‌<div class="m_6842896399435879972mt-signature">
        <a href="https://mailtrack.io/" class="m_6842896399435879972mt-signature-logo" style="text-decoration:none" target="_blank"><img src="https://s3-eu-west-1.amazonaws.com/mailtrack-crx/icon-signature.png" height="14"></a> <font style="color:rgb(153,153,153)">Sent with <a href="https://chrome.google.com/webstore/detail/mailtrack-for-gmail-inbox/ndnaehgpjlnokgebbaldlmgkapkpjkkb?utm_source=gmail&amp;utm_medium=signature&amp;utm_campaign=signaturevirality" class="m_6842896399435879972mt-install" target="_blank">Mailtrack</a></font>
        
    
    </div></div>
<br>______________________________<wbr>_________________<br>
Mne_analysis mailing list<br>
<a href="mailto:Mne_analysis@nmr.mgh.harvard.edu">Mne_analysis@nmr.mgh.harvard.<wbr>edu</a><br>
<a href="https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis" rel="noreferrer" target="_blank">https://mail.nmr.mgh.harvard.<wbr>edu/mailman/listinfo/mne_<wbr>analysis</a><br>
<br>
<br>
The information in this e-mail is intended only for the person to whom it is<br>
addressed. If you believe this e-mail was sent to you in error and the e-mail<br>
contains patient information, please contact the Partners Compliance HelpLine at<br>
<a href="http://www.partners.org/complianceline" rel="noreferrer" target="_blank">http://www.partners.org/<wbr>complianceline</a> . If the e-mail was sent to you in error<br>
but does not contain patient information, please contact the sender and properly<br>
dispose of the e-mail.<br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><a href="http://www.twitter.com/teon_io" style="font-size:12.8px" target="_blank">teon</a><span style="font-size:12.8px">, phd</span><br></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
</div>