# invalid encoding mne\_setup\_source\_space

**URL:** <https://mne.discourse.group/t/invalid-encoding-mne-setup-source-space/783>\
**Category:** Mailing List Archive (read-only)\
**Tags:** list-archive\
**Created:** [August 6, 2014, 9:48pm UTC](https://mne.discourse.group/t/invalid-encoding-mne-setup-source-space/783 "2014-08-06T21:48:36Z")\
**Posts on this page:** 3\
**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:** [August 6, 2014, 9:48pm UTC](https://mne.discourse.group/t/invalid-encoding-mne-setup-source-space/783/1 "2014-08-06T21:48:36Z")

</div>

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](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20140806/b9778457/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:** [August 7, 2014, 1:00pm UTC](https://mne.discourse.group/t/invalid-encoding-mne-setup-source-space/783/2 "2014-08-07T13:00:52Z")

</div>

hi,

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

Best,  
Alex

---

<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:** [August 7, 2014, 2:53pm UTC](https://mne.discourse.group/t/invalid-encoding-mne-setup-source-space/783/3 "2014-08-07T14:53:45Z")

</div>

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
