Skip to content
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

Jupyter labextension install issue #7793

Open
ticlazau opened this issue Jan 17, 2020 · 3 comments
Open

Jupyter labextension install issue #7793

ticlazau opened this issue Jan 17, 2020 · 3 comments

Comments

@ticlazau
Copy link

Hello,

I try to install several labextension install that privious work but not with the latest version.

jupyter labextension install jupyterlab_tensorboard
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-mpueqhlx.log

more /tmp/jupyterlab-debug-mpueqhlx.log
Yarn configuration loaded.
Node v10.13.0

/home/florin/anaconda3/envs/wmlce-1.6.2/bin/npm pack jupyterlab_tensorboard
Traceback (most recent call last):

File "/home/florin/anaconda3/envs/wmlce-1.6.2/lib/python3.6/site-packages/jupyterlab/debuglog.py", line 47, in debug_loggi
ng
yield

File "/home/florin/anaconda3/envs/wmlce-1.6.2/lib/python3.6/site-packages/jupyterlab/labextensions.py", line 93, in start
ans = self.run_task()

File "/home/florin/anaconda3/envs/wmlce-1.6.2/lib/python3.6/site-packages/jupyterlab/labextensions.py", line 149, in run_t
ask
for i, arg in enumerate(self.extra_args)

File "/home/florin/anaconda3/envs/wmlce-1.6.2/lib/python3.6/site-packages/jupyterlab/labextensions.py", line 149, in
for i, arg in enumerate(self.extra_args)

File "/home/florin/anaconda3/envs/wmlce-1.6.2/lib/python3.6/site-packages/jupyterlab/commands.py", line 398, in install_ex
tension
return handler.install_extension(extension, pin=pin)

File "/home/florin/anaconda3/envs/wmlce-1.6.2/lib/python3.6/site-packages/jupyterlab/commands.py", line 611, in install_ex
tension
info = self._install_extension(extension, tempdir, pin=pin)

File "/home/florin/anaconda3/envs/wmlce-1.6.2/lib/python3.6/site-packages/jupyterlab/commands.py", line 1507, in install
extension
info = self._extract_package(extension, tempdir, pin=pin)

File "/home/florin/anaconda3/envs/wmlce-1.6.2/lib/python3.6/site-packages/jupyterlab/commands.py", line 1574, in extract
package
ret = self._run([which('npm'), 'pack', source], cwd=tempdir)

File "/home/florin/anaconda3/envs/wmlce-1.6.2/lib/python3.6/site-packages/jupyterlab/commands.py", line 1748, in _run
return proc.wait()

File "/home/florin/anaconda3/envs/wmlce-1.6.2/lib/python3.6/site-packages/jupyterlab/commands.py", line 107, in wait
out, _ = proc.communicate(timeout=.1)

File "/home/florin/anaconda3/envs/wmlce-1.6.2/lib/python3.6/subprocess.py", line 863, in communicate
stdout, stderr = self._communicate(input, endtime, timeout)

File "/home/florin/anaconda3/envs/wmlce-1.6.2/lib/python3.6/subprocess.py", line 1574, in _communicate
self.stdout.errors)

File "/home/florin/anaconda3/envs/wmlce-1.6.2/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)

Exiting application: jupyter

Any idea how this can be solved?

Rgds,
Florin

@meeseeksmachine
Copy link
Contributor

This issue has been mentioned on Jupyter Community Forum. There might be relevant details there:

https://discourse.jupyter.org/t/cant-install-any-extensions-ascii-codec-cannot-decode-byte/2044/5

@vidartf
Copy link
Member

vidartf commented Jan 29, 2020

This seems weird. The sub-process code should be creating subprocess.Popen with the default value for universal_newlines and encoding, which should prevent Python from trying to decode anything as ASCII.

I see two things to try here:

  • Are you able to test if this works with Python 3.7?
  • Can you share the value from npm config get unicode? Can you try setting it to false with npm config set unicode false?

@gsaurabhr
Copy link

npm config set unicode false worked for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants