Skip to content
This repository has been archived by the owner on Sep 27, 2023. It is now read-only.

Error while enabling jupyter_http_over_ws extension #11

Open
Kshitij09 opened this issue Dec 19, 2019 · 12 comments
Open

Error while enabling jupyter_http_over_ws extension #11

Kshitij09 opened this issue Dec 19, 2019 · 12 comments

Comments

@Kshitij09
Copy link

I'm following the instructions described here.

The very second step to enable jupyter_http_over_ws jupyter extension gives following error:

Traceback (most recent call last):
  File "/usr/local/bin/jupyter-serverextension", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/dist-packages/jupyter_core/application.py", line 267, in launch_instance
    return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/traitlets/config/application.py", line 658, in launch_instance
    app.start()
  File "/usr/local/lib/python2.7/dist-packages/notebook/serverextensions.py", line 293, in start
    super(ServerExtensionApp, self).start()
  File "/usr/local/lib/python2.7/dist-packages/jupyter_core/application.py", line 256, in start
    self.subapp.start()
  File "/usr/local/lib/python2.7/dist-packages/notebook/serverextensions.py", line 210, in start
    self.toggle_server_extension_python(arg)
  File "/usr/local/lib/python2.7/dist-packages/notebook/serverextensions.py", line 199, in toggle_server_extension_python
    m, server_exts = _get_server_extension_metadata(package)
  File "/usr/local/lib/python2.7/dist-packages/notebook/serverextensions.py", line 327, in _get_server_extension_metadata
    m = import_item(module)
  File "/usr/local/lib/python2.7/dist-packages/traitlets/utils/importstring.py", line 42, in import_item
    return __import__(parts[0])
ImportError: No module named jupyter_http_over_ws

Tried installing tornado==5.1 as mentioned in #5

Also tried upgrading the package:
pip install --upgrade jupyter_http_over_ws

@dronenb
Copy link

dronenb commented Feb 25, 2020

How did you install jupyter? Via homebrew? I was having the same issue until I uninstalled all local copies of jupyter installed via pip and pip3, then I followed the instructions here and install the latest version of python via pyenv, then installed jupyter via homebrew. I then did 'pip3 install jupyter_http_over_ws' and the command to enable the extension worked fine.

@Kshitij09
Copy link
Author

I was working on colab so it was preinstalled

@fvapolina
Copy link

I uninstalled global (not in venv) jupyter notebook and it worked

@ethanm88
Copy link

@Kshitij09 I am facing the same issue with Google Colab.

@Dinkarkumar
Copy link

make sure if your whole working environment is installed with pip then use pip otherwise use pip3.
for example, my whole environment of anaconda , python library, jupyter notebook was installed with pip but i was enabling the second command as you mentioned in question with pip3. I got the same error as you but when i tried installing with pip and enabled using pip , it worked.
Screenshot from 2020-08-04 00-54-00
It showed the following error after executing second command.
Screenshot from 2020-08-04 00-53-46
Then again installed the library using pip as the following.
Screenshot from 2020-08-04 00-54-14
And finally it worked.
Screenshot from 2020-08-04 00-53-26
Hope it helps.

@nicoelbert
Copy link

If you installed your enviroment with conda, try to install the jupyter_http_over_ws package also via conda:

conda install -c conda-forge jupyter_http_over_ws

Then you should be able to enable the serverextension using:

jupyter serverextension enable --py jupyter_http_over_ws

After that run the following code also in PowerShell and you'll receive the url with the tokencode for Colab in there:

jupyter notebook --NotebookApp.allow_origin='https://colab.research.google.com' \ --port=9090 --no-browser

@mukteshkrmishra
Copy link

Thanks @nicoelbert , worked for me.

@ajay-aditatechnologies
Copy link

make sure if your whole working environment is installed with pip then use pip otherwise use pip3.
for example, my whole environment of anaconda , python library, jupyter notebook was installed with pip but i was enabling the second command as you mentioned in question with pip3. I got the same error as you but when i tried installing with pip and enabled using pip , it worked.
Screenshot from 2020-08-04 00-54-00
It showed the following error after executing second command.
Screenshot from 2020-08-04 00-53-46
Then again installed the library using pip as the following.
Screenshot from 2020-08-04 00-54-14
And finally it worked.
Screenshot from 2020-08-04 00-53-26
Hope it helps.

Can you please it does work with Ubuntu 20 version

@deKeijzer
Copy link

If you installed your enviroment with conda, try to install the jupyter_http_over_ws package also via conda:

conda install -c conda-forge jupyter_http_over_ws

Then you should be able to enable the serverextension using:

jupyter serverextension enable --py jupyter_http_over_ws

After that run the following code also in PowerShell and you'll receive the url with the tokencode for Colab in there:

jupyter notebook --NotebookApp.allow_origin='https://colab.research.google.com' \ --port=9090 --no-browser

This is still working, thanks!

@RobRomijnders
Copy link

+1 to reply by @dronenb . Installing jupyter notebook in a new virtualenv worked for me (i.e. such that the system jupyter is not used).

@gift-exe
Copy link

I've tried installing jupyter_http_over_ws_extension with pip, pip3, and conda. It installs successfully but when I try to enable it I get this error.

Screenshot from 2023-01-16 10-48-29

"jupyter serverextension enable --py jupyter_http_over_ws", is what I'm trying to use to enable the library

I read the markupsafe/init.py file and did not see a function or method named "soft_unicode".

I'd appreciate it if you tell me what to do to fix this error.

@RobRomijnders
Copy link

For me, the issue was fixed after re-install. Did you try that?

Also, your prompt starts with (base) $. Are you sure you did the installs in the (base) environment? I would recommend to make a separate environment to avoid confusion of versions.

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

No branches or pull requests