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

NotebookApp.launch_instance() fails when _ is defined #3324

Closed
SimonBiggs opened this issue Feb 10, 2018 · 0 comments · Fixed by #3326
Closed

NotebookApp.launch_instance() fails when _ is defined #3324

SimonBiggs opened this issue Feb 10, 2018 · 0 comments · Fixed by #3326

Comments

@SimonBiggs
Copy link

SimonBiggs commented Feb 10, 2018

Open up a python interactive prompt by typing 'python' within a terminal.

Copy and run the following lines of code into the python prompt:

from notebook.notebookapp import NotebookApp
'a'
NotebookApp.launch_instance()

The following error is raised:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/simon/.pyenv/versions/py36/lib/python3.6/site-packages/jupyter_core/application.py", line 266, in launch_instance
    return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
  File "/home/simon/.pyenv/versions/py36/lib/python3.6/site-packages/traitlets/config/application.py", line 658, in launch_instance
    app.start()
  File "/home/simon/.pyenv/versions/py36/lib/python3.6/site-packages/notebook/notebookapp.py", line 1584, in start
    for line in self.notebook_info().split("\n"):
  File "/home/simon/.pyenv/versions/py36/lib/python3.6/site-packages/notebook/notebookapp.py", line 1527, in notebook_info
    info = self.contents_manager.info_string() + "\n"
  File "/home/simon/.pyenv/versions/py36/lib/python3.6/site-packages/notebook/services/contents/filemanager.py", line 543, in info_string
    return _("Serving notebooks from local directory: %s") % self.root_dir
TypeError: 'str' object is not callable

It appears to be due to the global variable _ being used here:

https://github.com/jupyter/notebook/blob/master/notebook/services/contents/filemanager.py#L543

@minrk minrk added this to the 5.5 milestone Jun 15, 2018
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants