Michal
Michal

Reputation: 691

Cannot start jupyter notebook

When I try to start (any) jupyter notebook directly, I get the following error:

 Traceback (most recent call last):
  File "/usr/bin/jupyter-notebook", line 11, in <module>
    sys.exit(main())
  File "/usr/lib/python2.7/site-packages/jupyter_core/application.py",     line 266, in launch_instance
    return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
  File "/usr/lib/python2.7/site-    packages/traitlets/config/application.py", line 658, in launch_instance
    app.start()
  File "/usr/lib/python2.7/site-packages/notebook/notebookapp.py",     line 1784, in start
    self.launch_browser()
  File "/usr/lib/python2.7/site-packages/notebook/notebookapp.py",     line 1742, in launch_browser
    with open(fd, 'w', encoding='utf-8') as fh:
TypeError: coercing to Unicode: need string or buffer, int found

However, if I only start jupyter on some directory, I can open notebooks through browser just fine.

jupyter version: 4.4.0

python version: 2.7.15

OS: Fedora 29

Upvotes: 2

Views: 1394

Answers (2)

Michal
Michal

Reputation: 691

It was a problem introduced in notebook=5.7.3. Running with 5.7.2 works.

The problem was introduced in #4260 and backported to the 5.7.x branch in #4265.

Fix at #4340.

Fix should be part of notebook 5.7.5 when it is released.

More info at GitHub

Upvotes: 2

Aravinth Rajalingam
Aravinth Rajalingam

Reputation: 23

Assuming you are using the Anaconda for Jupyter Notebook, try using the update option. Use the following code "conda update anaconda" in the Terminal.

Upvotes: 0

Related Questions