-
Notifications
You must be signed in to change notification settings - Fork 532
fix: unicode characters in stderr on certain systems #1394
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
satra
commented
Mar 4, 2016
- hopefully fixes python 2 bytes/str issue #1393
@@ -655,17 +655,17 @@ def test_CommandLine_output(): | |||
ci = nib.CommandLine(command='ls -l') | |||
ci.inputs.terminal_output = 'allatonce' | |||
res = ci.run() | |||
yield assert_equal, res.runtime.merged, '' | |||
yield assert_equal, text_type(res.runtime.merged), text_type('') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should work fine without text_type
. On Python 2:
In [78]: unicode('hi there') == 'hi there'
Out[78]: True
On Python 3, literal strings are unicode, so you're comparing unicode to unicode already.
thank you @matthew-brett - i think i have cleaned this up for this issue. |
fix: unicode characters in stderr on certain systems
Hi, I stumbled across a weird error (at least for me) when running my nipype script and I think Here's the error message: Exception in thread Thread-7: It only appears when I merge the 3D .nii files into a 4D file using Fsl Merge before realignment. Using 3D files as input for the realignment node works fine. @satra: I checked if the fixes you made are included in my version and they are. I also updated nipype and it's dependencies. Unfortunately, it didn't resolve the error. I'm using python 2.7..12 in OS X El Capitan, both, in a VM and on my macbook. Can you think of anything that I could try to fix that? |
@PeerHerholz - there are two pieces to this error:
|
@satra thank you very much for your fast response and the pointers. I indeed forgot to set the output type in my merge node. After setting it to NIFTI the realignment and coregister nodes work fine (I'm basically trying to run the "classic" SPM pipeline, including unified segmentation). However, now the same error appears either in the segmentation or normalize _structural node (weirdly, depending on the machine I us). I thought it might be related to the default encoding, as I'm using Anaconda and Spyder, but no matter how I call the script (e.g. within spyder, command prompt, etc.) the error remains the same. Sorry, if this is a very noobish thing to guess / ask. |
@PeerHerholz - let me take a look |
@satra thank you very much. After some additional tests, I can provide you with some (hopefully) helpful information: After I changed the my pipeline from multiproc to serial the node seem to work, but only for one 170214-20:09:40,751 workflow INFO: After I upgraded nipype to the developer version, the same thing happened. I'm truly sorry for the hustle. |