berkeley-dsep-infra / hubploy

Toolkit to deploy many z2jh based JupyterHubs
BSD 3-Clause "New" or "Revised" License
16 stars 15 forks source link

String encoding error #1

Open ryanlovett opened 6 years ago

ryanlovett commented 6 years ago

While building berkeley-dsep-infra/datahub, hubploy exited with error:

Step 40/53 : RUN /usr/local/sbin/connector-neuro.bash
 ---> Running in bf7567027ee7
Cloning into 'pycortex'...

Note: checking out 'b4dd6d860d7c27a846a5445b0df2824429084b44'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at b4dd6d8 bug fix for trace_poly for degenerate edges

Compiling cortex/openctm.pyx because it changed.
Compiling cortex/formats.pyx because it changed.
[1/2] Cythonizing cortex/formats.pyx
[2/2] Cythonizing cortex/openctm.pyx
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/cortex
copying cortex/utils.py -> build/lib.linux-x86_64-3.6/cortex
copying cortex/appdirs.py -> build/lib.linux-x86_64-3.6/cortex
copying cortex/quickflat.py -> build/lib.linux-x86_64-3.6/cortex
copying cortex/dataset.py -> build/lib.linux-x86_64-3.6/cortex
copying cortex/svgsplines.py -> build/lib.linux-x86_64-3.6/cortex
copying cortex/align.py -> build/lib.linux-x86_64-3.6/cortex
copying cortex/freesurfer.py -> build/lib.linux-x86_64-3.6/cortex
copying cortex/options.py -> build/lib.linux-x86_64-3.6/cortex
copying cortex/volume.py -> build/lib.linux-x86_64-3.6/cortex
copying cortex/xfm.py -> build/lib.linux-x86_64-3.6/cortex
copying cortex/mp.py -> build/lib.linux-x86_64-3.6/cortex
copying cortex/mni.py -> build/lib.linux-x86_64-3.6/cortex
copying cortex/brainctm.py -> build/lib.linux-x86_64-3.6/cortex
copying cortex/anat.py -> build/lib.linux-x86_64-3.6/cortex
copying cortex/svgroi.py -> build/lib.linux-x86_64-3.6/cortex
copying cortex/polyutils.py -> build/lib.linux-x86_64-3.6/cortex
copying cortex/rois.py -> build/lib.linux-x86_64-3.6/cortex
copying cortex/formats_old.py -> build/lib.linux-x86_64-3.6/cortex
copying cortex/__init__.py -> build/lib.linux-x86_64-3.6/cortex
copying cortex/mayavi_aligner.py -> build/lib.linux-x86_64-3.6/cortex
copying cortex/segment.py -> build/lib.linux-x86_64-3.6/cortex
copying cortex/surfinfo.py -> build/lib.linux-x86_64-3.6/cortex
copying cortex/database.py -> build/lib.linux-x86_64-3.6/cortex
creating build/lib.linux-x86_64-3.6/cortex/webgl
copying cortex/webgl/FallbackLoader.py -> build/lib.linux-x86_64-3.6/cortex/webgl
copying cortex/webgl/data.py -> build/lib.linux-x86_64-3.6/cortex/webgl
copying cortex/webgl/htmlembed.py -> build/lib.linux-x86_64-3.6/cortex/webgl
copying cortex/webgl/serve.py -> build/lib.linux-x86_64-3.6/cortex/webgl
copying cortex/webgl/view.py -> build/lib.linux-x86_64-3.6/cortex/webgl
copying cortex/webgl/__init__.py -> build/lib.linux-x86_64-3.6/cortex/webgl
creating build/lib.linux-x86_64-3.6/cortex/mapper
copying cortex/mapper/point.py -> build/lib.linux-x86_64-3.6/cortex/mapper
copying cortex/mapper/volume.py -> build/lib.linux-x86_64-3.6/cortex/mapper
copying cortex/mapper/samplers.py -> build/lib.linux-x86_64-3.6/cortex/mapper
copying cortex/mapper/patch.py -> build/lib.linux-x86_64-3.6/cortex/mapper
copying cortex/mapper/line.py -> build/lib.linux-x86_64-3.6/cortex/mapper
copying cortex/mapper/__init__.py -> build/lib.linux-x86_64-3.6/cortex/mapper
creating build/lib.linux-x86_64-3.6/cortex/dataset
copying cortex/dataset/viewRGB.py -> build/lib.linux-x86_64-3.6/cortex/dataset
copying cortex/dataset/braindata.py -> build/lib.linux-x86_64-3.6/cortex/dataset
copying cortex/dataset/view2D.py -> build/lib.linux-x86_64-3.6/cortex/dataset
copying cortex/dataset/__init__.py -> build/lib.linux-x86_64-3.6/cortex/dataset
copying cortex/dataset/views.py -> build/lib.linux-x86_64-3.6/cortex/dataset
creating build/lib.linux-x86_64-3.6/cortex/blender
copying cortex/blender/blendlib.py -> build/lib.linux-x86_64-3.6/cortex/blender
copying cortex/blender/__init__.py -> build/lib.linux-x86_64-3.6/cortex/blender
creating build/lib.linux-x86_64-3.6/cortex/tests
copying cortex/tests/test_dataset.py -> build/lib.linux-x86_64-3.6/cortex/tests
copying cortex/tests/test_quickflat.py -> build/lib.linux-x86_64-3.6/cortex/tests
copying cortex/tests/test_polyutils.py -> build/lib.linux-x86_64-3.6/cortex/tests
copying cortex/tests/__init__.py -> build/lib.linux-x86_64-3.6/cortex/tests
copying cortex/svgbase.xml -> build/lib.linux-x86_64-3.6/cortex
copying cortex/defaults.cfg -> build/lib.linux-x86_64-3.6/cortex
copying cortex/bbr.sch -> build/lib.linux-x86_64-3.6/cortex
copying cortex/webgl/static.html -> build/lib.linux-x86_64-3.6/cortex/webgl
copying cortex/webgl/mixer.html -> build/lib.linux-x86_64-3.6/cortex/webgl
copying cortex/webgl/public.html -> build/lib.linux-x86_64-3.6/cortex/webgl
copying cortex/webgl/wngraph.html -> build/lib.linux-x86_64-3.6/cortex/webgl
copying cortex/webgl/simple.html -> build/lib.linux-x86_64-3.6/cortex/webgl
copying cortex/webgl/template.html -> build/lib.linux-x86_64-3.6/cortex/webgl
copying cortex/webgl/wngraph-minimal.html -> build/lib.linux-x86_64-3.6/cortex/webgl
copying cortex/webgl/favicon.ico -> build/lib.linux-x86_64-3.6/cortex/webgl
creating build/lib.linux-x86_64-3.6/cortex/webgl/resources
creating build/lib.linux-x86_64-3.6/cortex/webgl/resources/js
copying cortex/webgl/resources/js/jquery-ui-1.8.23.custom.min.js -> build/lib.linux-x86_64-3.6/cortex/webgl/resources/js
copying cortex/webgl/resources/js/rgbcolor.js -> build/lib.linux-x86_64-3.6/cortex/webgl/resources/js
copying cortex/webgl/resources/js/shadowtex.js -> build/lib.linux-x86_64-3.6/cortex/webgl/resources/js
copying cortex/webgl/resources/js/jquery.svganim.min.js -> build/lib.linux-x86_64-3.6/cortex/webgl/resources/js
copying cortex/webgl/resources/js/mriview.js -> build/lib.linux-x86_64-3.6/cortex/webgl/resources/js
copying cortex/webgl/resources/js/w2ui-1.2.min.js -> build/lib.linux-x86_64-3.6/cortex/webgl/resources/js
copying cortex/webgl/resources/js/surfgeometry.js -> build/lib.linux-x86_64-3.6/cortex/webgl/resources/js
copying cortex/webgl/resources/js/canvg.js -> build/lib.linux-x86_64-3.6/cortex/webgl/resources/js
copying cortex/webgl/resources/js/mriview_utils.js -> build/lib.linux-x86_64-3.6/cortex/webgl/resources/js
copying cortex/webgl/resources/js/sliceplane.js -> build/lib.linux-x86_64-3.6/cortex/webgl/resources/js
copying cortex/webgl/resources/js/jquery.ddslick.min.js -> build/lib.linux-x86_64-3.6/cortex/webgl/resources/js
copying cortex/webgl/resources/js/jquery-1.7.2.min.js -> build/lib.linux-x86_64-3.6/cortex/webgl/resources/js
copying cortex/webgl/resources/js/jquery.ui.touch-punch.min.js -> build/lib.linux-x86_64-3.6/cortex/webgl/resources/js
copying cortex/webgl/resources/js/facepick.js -> build/lib.linux-x86_64-3.6/cortex/webgl/resources/js
copying cortex/webgl/resources/js/Three.js -> build/lib.linux-x86_64-3.6/cortex/webgl/resources/js
copying cortex/webgl/resources/js/graphview.js -> build/lib.linux-x86_64-3.6/cortex/webgl/resources/js
copying cortex/webgl/resources/js/svgroi.js -> build/lib.linux-x86_64-3.6/cortex/webgl/resources/js
copying cortex/webgl/resources/js/figure.js -> build/lib.linux-x86_64-3.6/cortex/webgl/resources/js
copying cortex/webgl/resources/js/surfload.js -> build/lib.linux-x86_64-3.6/cortex/webgl/resources/js
copying cortex/webgl/resources/js/jquery-1.8.0.min.js -> build/lib.linux-x86_64-3.6/cortex/webgl/resources/js
copying cortex/webgl/resources/js/shaderlib.js -> build/lib.linux-x86_64-3.6/cortex/webgl/resources/js
copying cortex/webgl/resources/js/jgestures.min.js -> build/lib.linux-x86_64-3.6/cortex/webgl/resources/js
copying cortex/webgl/resources/js/python_interface.js -> build/lib.linux-x86_64-3.6/cortex/webgl/resources/js
copying cortex/webgl/resources/js/hoverintent.min.js -> build/lib.linux-x86_64-3.6/cortex/webgl/resources/js
copying cortex/webgl/resources/js/facepick_worker.js -> build/lib.linux-x86_64-3.6/cortex/webgl/resources/js
copying cortex/webgl/resources/js/dataset.js -> build/lib.linux-x86_64-3.6/cortex/webgl/resources/js
copying cortex/webgl/resources/js/jquery.svg.min.js -> build/lib.linux-x86_64-3.6/cortex/webgl/resources/js
copying cortex/webgl/resources/js/jquery.miniColors.js -> build/lib.linux-x86_64-3.6/cortex/webgl/resources/js
copying cortex/webgl/resources/js/kdTree-min.js -> build/lib.linux-x86_64-3.6/cortex/webgl/resources/js
copying cortex/webgl/resources/js/LandscapeControls.js -> build/lib.linux-x86_64-3.6/cortex/webgl/resources/js
copying cortex/webgl/resources/js/jquery-ui-1.8.23.min.js -> build/lib.linux-x86_64-3.6/cortex/webgl/resources/js
copying cortex/webgl/resources/js/datamodel.js -> build/lib.linux-x86_64-3.6/cortex/webgl/resources/js
copying cortex/webgl/resources/js/jquery-ui-1.8.21.custom.min.js -> build/lib.linux-x86_64-3.6/cortex/webgl/resources/js
creating build/lib.linux-x86_64-3.6/cortex/webgl/resources/js/ctm
copying cortex/webgl/resources/js/ctm/lzma.js -> build/lib.linux-x86_64-3.6/cortex/webgl/resources/js/ctm
copying cortex/webgl/resources/js/ctm/CTMLoader.js -> build/lib.linux-x86_64-3.6/cortex/webgl/resources/js/ctm
copying cortex/webgl/resources/js/ctm/CTMWorker.js -> build/lib.linux-x86_64-3.6/cortex/webgl/resources/js/ctm
copying cortex/webgl/resources/js/ctm/ctm.js -> build/lib.linux-x86_64-3.6/cortex/webgl/resources/js/ctm
creating build/lib.linux-x86_64-3.6/cortex/webgl/resources/css
copying cortex/webgl/resources/css/jsplot.css -> build/lib.linux-x86_64-3.6/cortex/webgl/resources/css
copying cortex/webgl/resources/css/mriview.css -> build/lib.linux-x86_64-3.6/cortex/webgl/resources/css
copying cortex/webgl/resources/css/jquery.miniColors.css -> build/lib.linux-x86_64-3.6/cortex/webgl/resources/css
copying cortex/webgl/resources/css/w2ui-1.2.min.css -> build/lib.linux-x86_64-3.6/cortex/webgl/resources/css
creating build/lib.linux-x86_64-3.6/cortex/webgl/resources/css/ui-lightness
copying cortex/webgl/resources/css/ui-lightness/jquery-ui-1.8.21.custom.css -> build/lib.linux-x86_64-3.6/cortex/webgl/resources/css/ui-lightness
copying cortex/webgl/resources/css/ui-lightness/jquery-ui-1.8.21.custom-2.css -> build/lib.linux-x86_64-3.6/cortex/webgl/resources/css/ui-lightness
creating build/lib.linux-x86_64-3.6/cortex/webgl/resources/css/ui-lightness/images
copying cortex/webgl/resources/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png -> build/lib.linux-x86_64-3.6/cortex/webgl/resources/css/ui-lightness/images
copying cortex/webgl/resources/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png -> build/lib.linux-x86_64-3.6/cortex/webgl/resources/css/ui-lightness/images
copying cortex/webgl/resources/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png -> build/lib.linux-x86_64-3.6/cortex/webgl/resources/css/ui-lightness/images
copying cortex/webgl/resources/css/ui-lightness/images/ui-icons_ef8c08_256x240.png -> build/lib.linux-x86_64-3.6/cortex/webgl/resources/css/ui-lightness/images
copying cortex/webgl/resources/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png -> build/lib.linux-x86_64-3.6/cortex/webgl/resources/css/ui-lightness/images
copying cortex/webgl/resources/css/ui-lightness/images/ui-icons_ffffff_256x240.png -> build/lib.linux-x86_64-3.6/cortex/webgl/resources/css/ui-lightness/images
copying cortex/webgl/resources/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png -> build/lib.linux-x86_64-3.6/cortex/webgl/resources/css/ui-lightness/images
copying cortex/webgl/resources/css/ui-lightness/images/ui-icons_ffd27a_256x240.png -> build/lib.linux-x86_64-3.6/cortex/webgl/resources/css/ui-lightness/images
copying cortex/webgl/resources/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png -> build/lib.linux-x86_64-3.6/cortex/webgl/resources/css/ui-lightness/images
copying cortex/webgl/resources/css/ui-lightness/images/ui-icons_222222_256x240.png -> build/lib.linux-x86_64-3.6/cortex/webgl/resources/css/ui-lightness/images
copying cortex/webgl/resources/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png -> build/lib.linux-x86_64-3.6/cortex/webgl/resources/css/ui-lightness/images
copying cortex/webgl/resources/css/ui-lightness/images/ui-icons_228ef1_256x240.png -> build/lib.linux-x86_64-3.6/cortex/webgl/resources/css/ui-lightness/images
copying cortex/webgl/resources/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png -> build/lib.linux-x86_64-3.6/cortex/webgl/resources/css/ui-lightness/images
copying cortex/webgl/resources/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png -> build/lib.linux-x86_64-3.6/cortex/webgl/resources/css/ui-lightness/images
creating build/lib.linux-x86_64-3.6/cortex/webgl/resources/images
copying cortex/webgl/resources/images/colors.png -> build/lib.linux-x86_64-3.6/cortex/webgl/resources/images
copying cortex/webgl/resources/images/loading.gif -> build/lib.linux-x86_64-3.6/cortex/webgl/resources/images
copying cortex/webgl/resources/images/magnifying_glass.png -> build/lib.linux-x86_64-3.6/cortex/webgl/resources/images
copying cortex/webgl/resources/images/control-pause.png -> build/lib.linux-x86_64-3.6/cortex/webgl/resources/images
copying cortex/webgl/resources/images/control-play.png -> build/lib.linux-x86_64-3.6/cortex/webgl/resources/images
copying cortex/webgl/resources/images/trigger.png -> build/lib.linux-x86_64-3.6/cortex/webgl/resources/images
running build_ext
building 'cortex.openctm' extension
C compiler: x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=/build/python3.6-EKG1lX/python3.6-3.6.5=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/cortex
creating build/temp.linux-x86_64-3.6/OpenCTM-1.0.3
creating build/temp.linux-x86_64-3.6/OpenCTM-1.0.3/lib
creating build/temp.linux-x86_64-3.6/OpenCTM-1.0.3/lib/liblzma
compile options: '-DLZMA_PREFIX_CTM -DOPENCTM_BUILD -IOpenCTM-1.0.3/lib/ -IOpenCTM-1.0.3/lib/liblzma/ -I/srv/app/venv/lib/python3.6/site-packages/numpy/core/include -I/srv/app/venv/include -I/usr/include/python3.6m -c'
x86_64-linux-gnu-gcc: cortex/openctm.c
Traceback (most recent call last):
  File "/root/repo/venv/bin/hubploy-image-builder", line 11, in <module>
    load_entry_point('hubploy==0.1.0', 'console_scripts', 'hubploy-image-builder')()
  File "/root/repo/venv/lib/python3.6/site-packages/hubploy/imagebuilder.py", line 132, in main
    build_image(client, args.path, image_spec, cache_from, partial(_print_progress, 'stream'))
  File "/root/repo/venv/lib/python3.6/site-packages/hubploy/imagebuilder.py", line 48, in build_image
    build_progress_cb(line)
  File "/root/repo/venv/lib/python3.6/site-packages/hubploy/imagebuilder.py", line 99, in _print_progress
    print(line[key].rstrip())
UnicodeEncodeError: 'ascii' codec can't encode character '\u2018' in position 691: ordinal not in range(128)
Exited with code 1

I modified a command in the failing Dockerfile step to capture the output and only display if there was an error.

ryanlovett commented 6 years ago

This came up with another library's output:

Searching for pandana>=0.3
Reading https://pypi.python.org/simple/pandana/
Downloading https://files.pythonhosted.org/packages/e3/a2/8285f08ef1dd7f1fd8d2110661b3978291d62b5afa27b61d9e0d2830d055/pandana-0.4.0.1.zip#sha256=d3b98db46177eaa3e85687931772fb92aec9932462a4d1e4808cdb9626890731
Best match: pandana 0.4.0.1
Processing pandana-0.4.0.1.zip
Writing /tmp/easy_install-0sqlx4uz/pandana-0.4.0/setup.cfg
Running pandana-0.4.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-0sqlx4uz/pandana-0.4.0/egg-dist-tmp-4m4te5kd
Traceback (most recent call last):
  File "/root/repo/venv/bin/hubploy-image-builder", line 11, in <module>
    load_entry_point('hubploy==0.1.0', 'console_scripts', 'hubploy-image-builder')()
  File "/root/repo/venv/lib/python3.6/site-packages/hubploy/imagebuilder.py", line 132, in main
    build_image(client, args.path, image_spec, cache_from, partial(_print_progress, 'stream'))
  File "/root/repo/venv/lib/python3.6/site-packages/hubploy/imagebuilder.py", line 48, in build_image
    build_progress_cb(line)
  File "/root/repo/venv/lib/python3.6/site-packages/hubploy/imagebuilder.py", line 99, in _print_progress
    print(line[key].rstrip())
UnicodeEncodeError: 'ascii' codec can't encode character '\u2018' in position 43: ordinal not in range(128)
Exited with code 1
ryanlovett commented 6 years ago

Possibility when running hubploy-image-builder:

  1. Set PYTHONIOENCODING=utf-8
  2. Set LANG=en_US.UTF-8