Can't install any extensions - ascii codec cannot decode byte

Hi,

Currently running Jupyterlab via Jupyterhub on a series of docker images.
This has all been working fine, however our users aren’t able to install extensions on their servers. I’ve tried via the Extension Manager, the CLI, and building the extensions from source and then linking them into Jupyterlab.

Has this been seen before?

Debug log:

root@eb484f04c686:~# jupyter labextension install @jupyter-widgets/jupyterlab-manager --debug
Searching [’/home/admin’, ‘/home/admin/.jupyter’, ‘/usr/local/etc/jupyter’, ‘/etc/jupyter’] for config files
Looking for jupyter_config in /etc/jupyter
Looking for jupyter_config in /usr/local/etc/jupyter
Looking for jupyter_config in /home/admin/.jupyter
Looking for jupyter_config in /home/admin
Node v11.15.0

/usr/bin/npm pack @jupyter-widgets/jupyterlab-manager
/Traceback (most recent call last):

File “/usr/local/lib/python3.6/site-packages/jupyterlab/debuglog.py”, line 47, in debug_logging
yield

File “/usr/local/lib/python3.6/site-packages/jupyterlab/labextensions.py”, line 82, in start
ans = self.run_task()

File “/usr/local/lib/python3.6/site-packages/jupyterlab/labextensions.py”, line 103, in run_task
for arg in self.extra_args

File “/usr/local/lib/python3.6/site-packages/jupyterlab/labextensions.py”, line 103, in
for arg in self.extra_args

File “/usr/local/lib/python3.6/site-packages/jupyterlab/commands.py”, line 316, in install_extension
return handler.install_extension(extension)

File “/usr/local/lib/python3.6/site-packages/jupyterlab/commands.py”, line 517, in install_extension
info = self._install_extension(extension, tempdir)

File “/usr/local/lib/python3.6/site-packages/jupyterlab/commands.py”, line 1373, in _install_extension
info = self._extract_package(extension, tempdir)

File “/usr/local/lib/python3.6/site-packages/jupyterlab/commands.py”, line 1441, in _extract_package
ret = self._run([which(‘npm’), ‘pack’, source], cwd=tempdir)

File “/usr/local/lib/python3.6/site-packages/jupyterlab/commands.py”, line 1610, in _run
return proc.wait()

File “/usr/local/lib/python3.6/site-packages/jupyterlab/commands.py”, line 96, in wait
out, _ = proc.communicate(timeout=.1)

File “/usr/local/lib/python3.6/subprocess.py”, line 863, in communicate
stdout, stderr = self._communicate(input, endtime, timeout)

File “/usr/local/lib/python3.6/subprocess.py”, line 1574, in _communicate
self.stdout.errors)

File “/usr/local/lib/python3.6/subprocess.py”, line 760, in _translate_newlines
data = data.decode(encoding, errors)

UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0xf0 in position 23: ordinal not in range(128)

An error occured.
UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0xf0 in position 23: ordinal not in range(128)
See the log file for details: /tmp/jupyterlab-debug-j_qpp0a8.log
Exiting application: jupyter

Subprocess communication encoding is always a bit of an issue. Lab leaves the issue to Python to deal with, so I’m not sure there is anything productive lab can do directly. To help troubleshoot this, what is your OS, and what are your locale settings?

If you have the possibility to test this on Python 3.7 as well, that might provide another useful input.

Hi,

We’re running Ubuntu and the locale setting is - en_US.UTF-8 (across all).

I won’t be able to give 3.7 a go for a bit of time unfortunately.