Skip to content

fixing unicode_literals issues #1638

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

Closed
wants to merge 3 commits into from
Closed

Conversation

bpinsard
Copy link
Contributor

see #1621
fixes my problems

@oesteban
Copy link
Contributor

Let me add FreeSurfer to the testing image, we could be missing something we are not currently testing.

@@ -211,7 +211,7 @@ def __init__(self, **inputs):
def _num_threads_update(self):
if self.inputs.num_threads:
self.inputs.environ.update(
{'OMP_NUM_THREADS': str(self.inputs.num_threads)})
{'OMP_NUM_THREADS': bytes(self.inputs.num_threads)})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Python 2:

>>> bytes(5)
'5'

Python 3:

>>> bytes(5)
b'\x00\x00\x00\x00\x00'

I suspect what you want is:

>>> str(5).encode()
b'5'

@codecov-io
Copy link

codecov-io commented Sep 16, 2016

Current coverage is 71.09% (diff: 100%)

Merging #1638 into master will decrease coverage by 0.01%

@@             master      #1638   diff @@
==========================================
  Files          1028       1030      +2   
  Lines         50616      51927   +1311   
  Methods           0          0           
  Messages          0          0           
  Branches       7333       7346     +13   
==========================================
+ Hits          35994      36919    +925   
- Misses        13495      13890    +395   
+ Partials       1127       1118      -9   

Powered by Codecov. Last update ff36588...08fab65

@satra
Copy link
Member

satra commented Oct 7, 2016

@bpinsard - can you check if current master fixes your issues? i cannot get this line to error using current master in either py27 or py35:

python -c "from nipype.pipeline import engine as pe; from nipype.interfaces import freesurfer; n_tesselate = pe.Node(freesurfer.MRITessellate(label_value=1), name='tesselate')"

@satra
Copy link
Member

satra commented Oct 12, 2016

@bpinsard - can you let us know if this still an issue with current master?

@oesteban
Copy link
Contributor

@bpinsard did installing traits>=4.5 fix this problem (see #1809)?

@bpinsard
Copy link
Contributor Author

@oesteban yes it seems that it is fixed now.
Thanks.

@bpinsard bpinsard closed this Feb 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants