invalid encoding mne_setup_source_space

Dear MNE community,

I am new in using MNE and I have a question that relates to invalid encoding.

I am having a problem with the use of the function mne_setup_source_space.

Let me explain how I reached to the error: after running freesurfer (installed on linux on virtual box) on one of my MRI scans I have installed mne with the following commands:
export MNE_ROOT=<MNE directory>
cd $MNE_ROOT/bin
. ./mne_setup_sh
This was completed without an error.

Then I have set my subjects' directory with:
export SUBJECTS_DIR=<MNE ANALYSIS DIR>/subjects
export SUBJECT=<subject's name>

Then I run: mne_setup_source_space --ico -6 and it produces the following error.:

1. Creating the source space file /usr/local/freesurfer/mne/MNE-2.7.0-3106-Linux-x86_64/subjects/teo/bem/teo-oct-6-src.fif...

/usr/local/freesurfer/mne/MNE-2.7.0-3106-Linux-x86_64/bin/mne_make_source_space: 2: /usr/local/freesurfer/mne/MNE-2.7.0-3106-Linux-x86_64/bin/mne_make_source_space: Syntax error: Unterminated quoted string
Source space creation failed
/usr/local/freesurfer/mne/MNE-2.7.0-3106-Linux-x86_64/bin/mne_make_source_space: 1: /usr/local/freesurfer/mne/MNE-2.7.0-3106-Linux-x86_64/bin/mne_make_source_space: ELF[1][1]: not found

Apparently is searching for a file with wrong encoding.

Is there something else I should do to make it run?
I have installed already netpbm successfully but I had the same problem when running mne_setup_source_space.
I also have set the encoding to utf-8 but no change in my error.

Another thing is that I am able to run mne_watershed_bem and create the .surf files the .COR files but at the end an error appears and I don't have the .fif files in my bem/watershed folder or bem/watershed/ws folder.
Also an error related to encoding appears so I guess the 2 errors are related.

Can you please help in solving this issue?
Thank you.
Best Regards,

K. (Nadia) Kalogianni
PhD candidate

TU Delft / Department of Biomechanical Engineering
Mekelweg 2
2628 CD Delft
Room: 34-H-3-320
T +31 15-27 84230
E k.kalogianni at tudelft.nl<mailto:k.kalogianni at tudelft.nl>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20140806/b9778457/attachment.html

hi,

let us know if Kam's answer helps or not.

Best,
Alex

It looks like the binary file $MNE_ROOT/bin/mne_make_source_space is being interpreted as a shell script. Do you have the same problem trying to run any other executable from $MNE_ROOT/bin? Sounds like the binaries may have been somehow damaged in transit.

Have you by any chance copied the MNE stuff to and from a Windows volume?

- Matti