{"action":"created","issue":{"url":"https://api.github.com/repos/nipy/nipype/issues/2100","repository_url":"https://api.github.com/repos/nipy/nipype","labels_url":"https://api.github.com/repos/nipy/nipype/issues/2100/labels{/name}","comments_url":"https://api.github.com/repos/nipy/nipype/issues/2100/comments","events_url":"https://api.github.com/repos/nipy/nipype/issues/2100/events","html_url":"https://github.com/nipy/nipype/issues/2100","id":238504260,"number":2100,"title":"**runtime.dictcopy())) RuntimeError: <exception str() failed>","user":{"login":"rattar1989","id":27786340,"avatar_url":"https://avatars2.githubusercontent.com/u/27786340?v=3","gravatar_id":"","url":"https://api.github.com/users/rattar1989","html_url":"https://github.com/rattar1989","followers_url":"https://api.github.com/users/rattar1989/followers","following_url":"https://api.github.com/users/rattar1989/following{/other_user}","gists_url":"https://api.github.com/users/rattar1989/gists{/gist_id}","starred_url":"https://api.github.com/users/rattar1989/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rattar1989/subscriptions","organizations_url":"https://api.github.com/users/rattar1989/orgs","repos_url":"https://api.github.com/users/rattar1989/repos","events_url":"https://api.github.com/users/rattar1989/events{/privacy}","received_events_url":"https://api.github.com/users/rattar1989/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-06-26T10:40:49Z","updated_at":"2017-06-27T15:49:59Z","closed_at":null,"body":"### Summary\r\nI wrapped a matlab code and got the results like the following:\r\n\r\n```\r\nstty: 'standard input': Inappropriate ioctl for device\r\nTraceback (most recent call last):\r\n  File \"/home/ubuntu/PycharmProjects/Wrapper/wrapper2.py\", line 12, in <module>\r\n    res = matlab.run()\r\n  File \"/home/ubuntu/anaconda2/lib/python2.7/site-packages/nipype/interfaces/base.py\", line 1081, in run\r\n    runtime = self._run_wrapper(runtime)\r\n  File \"/home/ubuntu/anaconda2/lib/python2.7/site-packages/nipype/interfaces/base.py\", line 1724, in _run_wrapper\r\n    runtime = self._run_interface(runtime)\r\n  File \"/home/ubuntu/anaconda2/lib/python2.7/site-packages/nipype/interfaces/matlab.py\", line 152, in _run_interface\r\n    self.raise_exception(runtime)\r\n  File \"/home/ubuntu/anaconda2/lib/python2.7/site-packages/nipype/interfaces/base.py\", line 1682, in raise_exception\r\n    **runtime.dictcopy()))\r\nRuntimeError: <exception str() failed>\r\n\r\nProcess finished with exit code 1\r\n```\r\n### Expected behavior\r\nI expect no errors because the code works correctly and the outputs are the same when I run it on matlab."},"comment":{"url":"https://api.github.com/repos/nipy/nipype/issues/comments/311401093","html_url":"https://github.com/nipy/nipype/issues/2100#issuecomment-311401093","issue_url":"https://api.github.com/repos/nipy/nipype/issues/2100","id":311401093,"user":{"login":"rattar1989","id":27786340,"avatar_url":"https://avatars2.githubusercontent.com/u/27786340?v=3","gravatar_id":"","url":"https://api.github.com/users/rattar1989","html_url":"https://github.com/rattar1989","followers_url":"https://api.github.com/users/rattar1989/followers","following_url":"https://api.github.com/users/rattar1989/following{/other_user}","gists_url":"https://api.github.com/users/rattar1989/gists{/gist_id}","starred_url":"https://api.github.com/users/rattar1989/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rattar1989/subscriptions","organizations_url":"https://api.github.com/users/rattar1989/orgs","repos_url":"https://api.github.com/users/rattar1989/repos","events_url":"https://api.github.com/users/rattar1989/events{/privacy}","received_events_url":"https://api.github.com/users/rattar1989/received_events","type":"User","site_admin":false},"created_at":"2017-06-27T15:49:59Z","updated_at":"2017-06-27T15:49:59Z","body":"- can you verify script is correct?\r\nThere are only the following lines that have been added at the end of the `pyscript.m` file but the rest are the same as my matlab script:\r\n```\r\n,catch ME,\r\nfprintf(2,'MATLAB code threw an exception:\\n');\r\nfprintf(2,'%s\\n',ME.message);\r\nif length(ME.stack) ~= 0, fprintf(2,'File:%s\\nName:%s\\nLine:%d\\n',ME.stack.file,ME.stack.name,ME.stack.line);, end;\r\nend;\r\n```\r\n- and could you try running the last two lines outside of the open() call?\r\nif you mean these lines:\r\n```\r\nmatlab.inputs.script = script\r\n        matlab.run()\r\n```\r\nthe output is:\r\n```\r\nTraceback (most recent call last):\r\n  File \"/home/ubuntu/anaconda2/lib/python2.7/site-packages/IPython/core/interactiveshell.py\", line 2881, in run_code\r\n    exec(code_obj, self.user_global_ns, self.user_ns)\r\n  File \"<ipython-input-4-02d858c457b5>\", line 1, in <module>\r\n    matlab.inputs.script = script\r\nNameError: name 'script' is not defined\r\n```\r\nbut if you mean something like the following:\r\n```\r\nimport nipype.interfaces.matlab as Matlab\r\nmatlab = Matlab.MatlabCommand()\r\nmatlab.inputs.paths = ['/home/ubuntu/matlab/MATLAB']\r\n\r\nwith open(\"/home/ubuntu/matlab/MATLAB/new/data_organization.m\", \"r\") as src:\r\n    script = src.read()\r\n    matlab.inputs.script = script\r\n    res = matlab.run()\r\n```\r\nthen the output is:\r\n```\r\nstty: 'standard input': Inappropriate ioctl for device\r\nTraceback (most recent call last):\r\n  File \"/home/rahman/PycharmProjects/Wrapper/callWrapper.py\", line 12, in <module>\r\n    res = matlab.run()\r\n  File \"/home/rahman/anaconda2/lib/python2.7/site-packages/nipype/interfaces/base.py\", line 1081, in run\r\n    runtime = self._run_wrapper(runtime)\r\n  File \"/home/rahman/anaconda2/lib/python2.7/site-packages/nipype/interfaces/base.py\", line 1724, in _run_wrapper\r\n    runtime = self._run_interface(runtime)\r\n  File \"/home/rahman/anaconda2/lib/python2.7/site-packages/nipype/interfaces/matlab.py\", line 152, in _run_interface\r\n    self.raise_exception(runtime)\r\n  File \"/home/rahman/anaconda2/lib/python2.7/site-packages/nipype/interfaces/base.py\", line 1682, in raise_exception\r\n    **runtime.dictcopy()))\r\nRuntimeError: <exception str() failed>\r\n\r\nProcess finished with exit code 1\r\n```"}}
{"actor":{"display_login":"rattar1989"}}