raw.append returning NoneType?

?Hello,

    I am trying to append two raw files and then write their combination into a third file as follows (see https://mail.nmr.mgh.harvard.edu/pipermail//mne_analysis/2013-July/001569.html ):

import mne

raw1 = mne.io.raw(raw_file_name_1)

raw2 = mne.io.raw(raw_file_name_2)

raw = raw1.append(raw2)

raw.save(combined_file_name)

But receive the following error at the 'save' step: AttributeError: 'NoneType' object has no attribute 'save'

This feels like something obvious, but I can't seem to find it. I am running the python code from the development tree, downloaded about a month ago. I think the relevant file is io/base.py, which is as follows:

-rw-rw-r-- 1 lysne lysne 75207 Oct 11 13:35 base.py

Thanks for everyone's help,

Per Lysne

University of New Mexico
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20141109/69cc325c/attachment.html

Hi Per,

`.append` follows the semantics of Python lists in operating in place.
Invoking .append on a Raw object just appends the data:

raw1.append(raw2)

Then move on with raw1 which now also incluedes the data from raw2.

HTH,
Denis

2014-11-09 22:22 GMT+01:00 Per Arnold Lysne <lysne at unm.edu>:

?Hello,

     I am trying to append two raw files and then write their combination
into a third file as follows (see
[Mne_analysis] Concatenating raw instances with Raw.append
):

import mne

raw1 = mne.io.raw(raw_file_name_1)

raw2 = mne.io.raw(raw_file_name_2)

raw = raw1.append(raw2)

raw.save(combined_file_name)

But receive the following error at the 'save' step: AttributeError:
'NoneType' object has no attribute 'save'

This feels like something obvious, but I can't seem to find it. I am
running the python code from the development tree, downloaded about a month
ago. I think the relevant file is io/base.py, which is as follows:

-rw-rw-r-- 1 lysne lysne 75207 Oct 11 13:35 base.py

Thanks for everyone's help,

Per Lysne

University of New Mexico

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

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 . 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/20141109/95e2c7c9/attachment.html