Closed binarybottle closed 5 years ago
I added "encoding='utf-8'" to write commands (all open file handle commands, except pickle writes) in two nipype files within mindboggle's docker image that generate reports for mindboggle:
Example (line 688 of filemanip.py):
with open(filename, 'w') as fp:
to with open(filename, 'w', encoding='utf-8') as fp:
Mindboggle runs fine now, so I will update the docker image (docker commit
, as in https://docs.docker.com/engine/reference/commandline/commit/), push the image to docker hub, and wait for a fix at nipype's end for future releases.
Running:
mindboggle $FREESURFER_SUBJECT --out $OUT --no_volumes --no_moments --no_spectra --no_sulci
results in UnicodeEncodeError in multiple places within nipype:
This is despite the fact that within the docker container, UTF-8 is set by default:
and seems resistant to setting
ENV PYTHONIOENCODING=utf-8
or running (https://stackoverflow.com/questions/43356982/docker-python-set-utf-8-locale):
docker run -e PYTHONIOENCODING=UTF-8 ...
The only thing that seems to work is to set "encoding='utf-8'" in the nipype python functions themselves.
I have left an issue in the nipy/nipype repo: https://github.com/nipy/nipype/issues/2942