Skip to content

Commit 3ace38d

Browse files
committed
temporary patches for issue 1396
1 parent cb207f8 commit 3ace38d

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

nipype/interfaces/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1164,7 +1164,7 @@ def read(self, drain=0):
11641164
def _read(self, drain):
11651165
"Read from the file descriptor"
11661166
fd = self.fileno()
1167-
buf = os.read(fd, 4096).decode()
1167+
buf = os.read(fd, 4096).decode(locale.getdefaultlocale()[1])
11681168
if not buf and not self._buf:
11691169
return None
11701170
if '\n' not in buf:

nipype/pipeline/plugins/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ def _send_procs_to_workers(self, updatehash=False, graph=None):
363363
self.proc_done[jobid] = True
364364
self.proc_pending[jobid] = True
365365
# Send job to task manager and add to pending tasks
366-
logger.info('Executing: %s ID: %d' %
366+
logger.info('Submitting: %s ID: %d' %
367367
(self.procs[jobid]._id, jobid))
368368
if self._status_callback:
369369
self._status_callback(self.procs[jobid], 'start')
@@ -405,7 +405,7 @@ def _send_procs_to_workers(self, updatehash=False, graph=None):
405405
self.proc_pending[jobid] = False
406406
else:
407407
self.pending_tasks.insert(0, (tid, jobid))
408-
logger.info('Finished executing: %s ID: %d' %
408+
logger.info('Finished submitting: %s ID: %d' %
409409
(self.procs[jobid]._id, jobid))
410410
else:
411411
break

nipype/pipeline/plugins/pbs.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
from .base import (SGELikeBatchManagerBase, logger, iflogger, logging)
99

10-
from nipype.interfaces.base import CommandLine
10+
from ...interfaces.base import CommandLine, text_type
1111

1212

1313
class PBSPlugin(SGELikeBatchManagerBase):
@@ -87,6 +87,8 @@ def _submit_batchtask(self, scriptfile, node):
8787
iflogger.setLevel(logging.getLevelName('CRITICAL'))
8888
tries = 0
8989
while True:
90+
result = cmd.run()
91+
'''
9092
try:
9193
result = cmd.run()
9294
except Exception as e:
@@ -97,9 +99,10 @@ def _submit_batchtask(self, scriptfile, node):
9799
iflogger.setLevel(oldlevel)
98100
raise RuntimeError('\n'.join((('Could not submit pbs task'
99101
' for node %s') % node._id,
100-
str(e))))
102+
text_type(e))))
101103
else:
102104
break
105+
'''
103106
iflogger.setLevel(oldlevel)
104107
# retrieve pbs taskid
105108
taskid = result.runtime.stdout.split('.')[0]

0 commit comments

Comments
 (0)