{"action":"created","issue":{"url":"https://api.github.com/repos/nipy/nipype/issues/1396","repository_url":"https://api.github.com/repos/nipy/nipype","labels_url":"https://api.github.com/repos/nipy/nipype/issues/1396/labels{/name}","comments_url":"https://api.github.com/repos/nipy/nipype/issues/1396/comments","events_url":"https://api.github.com/repos/nipy/nipype/issues/1396/events","html_url":"https://github.com/nipy/nipype/issues/1396","id":138901579,"number":1396,"title":"problem running with plugin PBS on cluster","user":{"login":"venpopov","id":12783882,"avatar_url":"https://avatars.githubusercontent.com/u/12783882?v=3","gravatar_id":"","url":"https://api.github.com/users/venpopov","html_url":"https://github.com/venpopov","followers_url":"https://api.github.com/users/venpopov/followers","following_url":"https://api.github.com/users/venpopov/following{/other_user}","gists_url":"https://api.github.com/users/venpopov/gists{/gist_id}","starred_url":"https://api.github.com/users/venpopov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/venpopov/subscriptions","organizations_url":"https://api.github.com/users/venpopov/orgs","repos_url":"https://api.github.com/users/venpopov/repos","events_url":"https://api.github.com/users/venpopov/events{/privacy}","received_events_url":"https://api.github.com/users/venpopov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":14,"created_at":"2016-03-07T06:44:57Z","updated_at":"2016-03-07T22:33:03Z","closed_at":null,"body":"I'm following this tutorial to learn nipype: http://miykael.github.io/nipype-beginner-s-guide/firstSteps.html\r\n\r\nThe preprocessing script works fine on my personal computer:\r\nhttps://github.com/miykael/nipype-beginner-s-guide/blob/master/scripts/tutorial_3_first_steps.py\r\n\r\nHowever I get the following error on a CentOS 6.2 remote cluster:\r\n\r\n```\r\n/data2/rederlab/software/anaconda2/lib/python2.7/site-packages/IPython/kernel/__init__.py:13: ShimWarning: The `IPython.kernel` package has been deprecated. You should import from ipykernel or jupyter_client instead.\r\n  \"You should import from ipykernel or jupyter_client instead.\", ShimWarning)\r\n\r\nTraceback (most recent call last):\r\n  File \"/home/vpopov/nipype_tutorial/nipype_tutorial.py\", line 125, in <module>\r\n    plugin_args=dict(qsub_args='-l nodes=4:ppn=5'))\r\n  File \"/data2/rederlab/software/anaconda2/lib/python2.7/site-packages/nipype/pipeline/engine/workflows.py\", line 595, in run\r\n    runner.run(execgraph, updatehash=updatehash, config=self.config)\r\n  File \"/data2/rederlab/software/anaconda2/lib/python2.7/site-packages/nipype/pipeline/plugins/base.py\", line 265, in run\r\n    graph=graph)\r\n  File \"/data2/rederlab/software/anaconda2/lib/python2.7/site-packages/nipype/pipeline/plugins/base.py\", line 402, in _send_procs_to_workers\r\n    updatehash=updatehash)\r\n  File \"/data2/rederlab/software/anaconda2/lib/python2.7/site-packages/nipype/pipeline/plugins/base.py\", line 564, in _submit_job\r\n    return self._submit_batchtask(batchscriptfile, node)\r\n  File \"/data2/rederlab/software/anaconda2/lib/python2.7/site-packages/nipype/pipeline/plugins/pbs.py\", line 100, in _submit_batchtask\r\n    str(e))))\r\n\r\nRuntimeError: Could not submit pbs task for node selectfiles.a04\r\ndecode() argument 1 must be string, not None\r\nInterface CommandLine failed to run. \r\n```\r\n\r\nI've changed the workflow run command to execute with the server's PBS scheduling system:\r\n\r\n```\r\npreprocess.run(plugin='PBS', \r\n               plugin_args=dict(qsub_args='-l nodes=4:ppn=5'))\r\n```\r\n\r\nAlso, I've removed the write_graph command and the import of pygraphviz, because I couldn't install graphviz and pygraphviz on the server (I have no root access, maybe it's possible to circumvent this somehow?)\r\n\r\nAny help is appreciated.\r\n"},"comment":{"url":"https://api.github.com/repos/nipy/nipype/issues/comments/193486242","html_url":"https://github.com/nipy/nipype/issues/1396#issuecomment-193486242","issue_url":"https://api.github.com/repos/nipy/nipype/issues/1396","id":193486242,"user":{"login":"satra","id":184063,"avatar_url":"https://avatars.githubusercontent.com/u/184063?v=3","gravatar_id":"","url":"https://api.github.com/users/satra","html_url":"https://github.com/satra","followers_url":"https://api.github.com/users/satra/followers","following_url":"https://api.github.com/users/satra/following{/other_user}","gists_url":"https://api.github.com/users/satra/gists{/gist_id}","starred_url":"https://api.github.com/users/satra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/satra/subscriptions","organizations_url":"https://api.github.com/users/satra/orgs","repos_url":"https://api.github.com/users/satra/repos","events_url":"https://api.github.com/users/satra/events{/privacy}","received_events_url":"https://api.github.com/users/satra/received_events","type":"User","site_admin":false},"created_at":"2016-03-07T22:33:03Z","updated_at":"2016-03-07T22:33:03Z","body":"ok here is the likely culprit - let me know if the change below helps. if so i'll update the codebase.\r\n\r\n```\r\ndiff --git a/nipype/interfaces/base.py b/nipype/interfaces/base.py\r\nindex 742ccd3..e1b854c 100644\r\n--- a/nipype/interfaces/base.py\r\n+++ b/nipype/interfaces/base.py\r\n@@ -1164,7 +1164,7 @@ class Stream(object):\r\n     def _read(self, drain):\r\n         \"Read from the file descriptor\"\r\n         fd = self.fileno()\r\n-        buf = os.read(fd, 4096).decode()\r\n+        buf = os.read(fd, 4096).decode(locale.getdefaultlocale()[1])\r\n         if not buf and not self._buf:\r\n             return None\r\n         if '\\n' not in buf:\r\n```"}}