zmk5 / jupyter-ros2

Jupyter widget helpers for ros2, the Next-Generation of the Robot Operating System
28 stars 8 forks source link

Module is called jupyros instead of jupyros2? #11

Open hsd-dev opened 3 years ago

hsd-dev commented 3 years ago

The command

 jupyter nbextension install --user --py --symlink jupyros2

gives me an error

Traceback (most recent call last):
  File "/home/user/.local/bin/jupyter-nbextension", line 8, in <module>
    sys.exit(main())
  File "/home/user/.local/lib/python3.8/site-packages/jupyter_core/application.py", line 254, in launch_instance
    return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
  File "/usr/lib/python3/dist-packages/traitlets/config/application.py", line 664, in launch_instance
    app.start()
  File "/home/user/.local/lib/python3.8/site-packages/notebook/nbextensions.py", line 980, in start
    super().start()
  File "/home/user/.local/lib/python3.8/site-packages/jupyter_core/application.py", line 243, in start
    self.subapp.start()
  File "/home/user/.local/lib/python3.8/site-packages/notebook/nbextensions.py", line 708, in start
    self.install_extensions()
  File "/home/user/.local/lib/python3.8/site-packages/notebook/nbextensions.py", line 679, in install_extensions
    full_dests = install(self.extra_args[0],
  File "/home/user/.local/lib/python3.8/site-packages/notebook/nbextensions.py", line 203, in install_nbextension_python
    m, nbexts = _get_nbextension_metadata(module)
  File "/home/user/.local/lib/python3.8/site-packages/notebook/nbextensions.py", line 1114, in _get_nbextension_metadata
    m = import_item(module)
  File "/usr/lib/python3/dist-packages/traitlets/utils/importstring.py", line 42, in import_item
    return __import__(parts[0])
ModuleNotFoundError: No module named 'jupyros2'

But changing that to

jupyter nbextension install --user --py --symlink jupyros

successfully installs the module

register_cell_magic not enabled!
Installing /home/user/notebook/jupyter-ros2/jupyros/static -> jupyter-ros
Symlinking: /home/user/.local/share/jupyter/nbextensions/jupyter-ros -> /home/user/notebook/jupyter-ros2/jupyros/static
- Validating: OK

    To initialize this nbextension in the browser every time the notebook (or other app) loads:

          jupyter nbextension enable jupyros --user --py

I am new to jupyter so I am not sure where to make the required changes