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

from notebook import notebookapp not working in version 7.0.2 #7010

Closed
anuragdogra2192 opened this issue Aug 14, 2023 · 2 comments
Closed

from notebook import notebookapp not working in version 7.0.2 #7010

anuragdogra2192 opened this issue Aug 14, 2023 · 2 comments

Comments

@anuragdogra2192
Copy link

Description

from notebook import notebookapp, this module is not available on 7.0.2

Reproduce

from notebook import notebookapp as _notebookapp

Output:

ImportError Traceback (most recent call last)
Cell In[10], line 1
----> 1 from notebook import notebookapp as _notebookapp

ImportError: cannot import name 'notebookapp' from 'notebook'

  1. Go to '...'
  2. Click on '...'
  3. Scroll down to '...'
  4. See error '...'

Expected behavior

from notebook import notebookapp - Should be loaded
_notebookapp.list_running_servers() and provide the running servers

Context

  • Operating System and version: Windows 10
  • Browser and version:
  • Jupyter Notebook version: notebook : 7.0.2
    Selected Jupyter core packages...
Troubleshoot Output
Paste the output from running `jupyter troubleshoot` from the command line here.
You may want to sanitize the paths in the output.
Command Line Output
Paste the output from your command line running `jupyter notebook` here, use `--debug` if possible.
Browser Output
Paste the output from your browser Javascript console here, if applicable.
@anuragdogra2192 anuragdogra2192 added bug status:Needs Triage Applied to issues that need triage labels Aug 14, 2023
@RRosio
Copy link
Collaborator

RRosio commented Aug 15, 2023

Hi @anuragdogra2192 thank you for submitting this issue! As Notebook 7 is a new codebase, the notebookapp.py module is no longer present. At the moment I am not sure if this is a possibility in the Notebook codebase. You can run jupyter server list from your command line to view the running servers (thanks @JasonWeill).

@RRosio
Copy link
Collaborator

RRosio commented Aug 15, 2023

You can access this same functionality within a notebook in Jupyter Notebook 7, with the following code:

from jupyter_server import serverapp
serverapp.list_running_servers()

jpmckinney added a commit to open-contracting/kingfisher-colab that referenced this issue Sep 5, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants