{"action":"created","issue":{"url":"https://api.github.com/repos/mne-tools/mne-python/issues/3674","repository_url":"https://api.github.com/repos/mne-tools/mne-python","labels_url":"https://api.github.com/repos/mne-tools/mne-python/issues/3674/labels{/name}","comments_url":"https://api.github.com/repos/mne-tools/mne-python/issues/3674/comments","events_url":"https://api.github.com/repos/mne-tools/mne-python/issues/3674/events","html_url":"https://github.com/mne-tools/mne-python/issues/3674","id":184270278,"number":3674,"title":"make_watershed_bem - IOError: [Errno 13] Permission denied: 'brain'","user":{"login":"WilliamCollishaw","id":16943514,"avatar_url":"https://avatars.githubusercontent.com/u/16943514?v=3","gravatar_id":"","url":"https://api.github.com/users/WilliamCollishaw","html_url":"https://github.com/WilliamCollishaw","followers_url":"https://api.github.com/users/WilliamCollishaw/followers","following_url":"https://api.github.com/users/WilliamCollishaw/following{/other_user}","gists_url":"https://api.github.com/users/WilliamCollishaw/gists{/gist_id}","starred_url":"https://api.github.com/users/WilliamCollishaw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WilliamCollishaw/subscriptions","organizations_url":"https://api.github.com/users/WilliamCollishaw/orgs","repos_url":"https://api.github.com/users/WilliamCollishaw/repos","events_url":"https://api.github.com/users/WilliamCollishaw/events{/privacy}","received_events_url":"https://api.github.com/users/WilliamCollishaw/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2016-10-20T15:57:43Z","updated_at":"2016-10-25T19:11:18Z","closed_at":null,"body":"System:\r\nPython 2.7.12\r\nUbuntu 16.04.1 LTS\r\nMNE version 0.14.git\r\n\r\nI have been running into a few problems with this function. Initially I had the same problem as #3274 where freesurfer was not being found/setup correctly. I thought this was fixed in 0.14 but I ran into the same issue. I manually modified the utils.py to setup freesurfer before it ran the command. That fixed the problem but I get this new problem, Permission denied, 'brain'\r\nThe following shows the error. I have editted a few things such as subject directory for privacy reasons.\r\n\r\n`Saving /SUBJECT_DIR/bem/watershed/ws`\r\n`done`\r\n`Triangle file: created by USER on Tue Oct 18 15:30:33 2016 nvert = 10242 ntri = 20480`\r\n    `Triangle neighbors and vertex normals...`\r\n`Traceback (most recent call last):`\r\n `File \"pythonScripts/pipeline.py\", line 208, in <module>`\r\n    `main()`\r\n `File \"pythonScripts/pipeline.py\", line 169, in main`\r\n   ` bem.make_watershed_bem(URSI, subjects_dir=MRISubjectDirectory, overwrite=True)`\r\n ` File \"<string>\", line 2, in make_watershed_bem`\r\n ` File \"/usr/local/lib/python2.7/dist-packages/mne/utils.py\", line 708, in verbose`\r\n  `  return function(*args, **kwargs)`\r\n`  File \"/usr/local/lib/python2.7/dist-packages/mne/bem.py\", line 1081, in make_watershed_bem`\r\n   ` write_surface(s, surf['rr'], surf['tris'], volume_info=volume_info)`\r\n  `File \"/usr/local/lib/python2.7/dist-packages/mne/surface.py\", line 764, in write_surface`\r\n    `with open(fname, 'wb') as fid:`\r\n`IOError: [Errno 13] Permission denied: 'brain'`\r\n\r\nI hope this gives enough information!\r\n\r\nExtra information, I was getting these issues previously using an older system:\r\nCentOS release 6.7\r\nPython 2.6.6\r\nMNE version 0.12\r\n\r\nUpgraded system to get newer version of MNE but the problems still exist\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/mne-tools/mne-python/issues/comments/256145770","html_url":"https://github.com/mne-tools/mne-python/issues/3674#issuecomment-256145770","issue_url":"https://api.github.com/repos/mne-tools/mne-python/issues/3674","id":256145770,"user":{"login":"Eric89GXL","id":2365790,"avatar_url":"https://avatars.githubusercontent.com/u/2365790?v=3","gravatar_id":"","url":"https://api.github.com/users/Eric89GXL","html_url":"https://github.com/Eric89GXL","followers_url":"https://api.github.com/users/Eric89GXL/followers","following_url":"https://api.github.com/users/Eric89GXL/following{/other_user}","gists_url":"https://api.github.com/users/Eric89GXL/gists{/gist_id}","starred_url":"https://api.github.com/users/Eric89GXL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Eric89GXL/subscriptions","organizations_url":"https://api.github.com/users/Eric89GXL/orgs","repos_url":"https://api.github.com/users/Eric89GXL/repos","events_url":"https://api.github.com/users/Eric89GXL/events{/privacy}","received_events_url":"https://api.github.com/users/Eric89GXL/received_events","type":"User","site_admin":false},"created_at":"2016-10-25T19:11:18Z","updated_at":"2016-10-25T19:11:18Z","body":"> I am trying to get permissions to debug in the surface.py file which is why it is taking a while\r\n\r\nYou shouldn't need write permissions to do post-mortem debugging. Run the code in a python interpreter in interactive mode, and when you hit an error do `pdb.pm()`. Like:\r\n```\r\n>>> import pdb\r\n>>> import mne\r\n>>> mne.bem.make_watershed_bem('foo')\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\n  File \"<string>\", line 2, in make_watershed_bem\r\n  File \"/home/larsoner/custombuilds/mne-python/mne/utils.py\", line 682, in verbose\r\n    return function(*args, **kwargs)\r\n  File \"/home/larsoner/custombuilds/mne-python/mne/bem.py\", line 1022, in make_watershed_bem\r\n    requires_mne=True)[:2]\r\n  File \"/home/larsoner/custombuilds/mne-python/mne/bem.py\", line 1504, in _prepare_env\r\n    raise RuntimeError('I cannot find freesurfer. The FREESURFER_HOME '\r\nRuntimeError: I cannot find freesurfer. The FREESURFER_HOME environment variable is not set.\r\n>>> pdb.pm()\r\n> /home/larsoner/custombuilds/mne-python/mne/bem.py(1504)_prepare_env()\r\n-> raise RuntimeError('I cannot find freesurfer. The FREESURFER_HOME '\r\n(Pdb) p subjects_dir\r\nNone\r\n```"}}
{"actor":{"display_login":"Eric89GXL"}}