jupyter / jupyter/notebook

Error when trying to run in tmux on MacOS 10.15.5

Open
#5,604 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
13.3k
Forks
5.8k
Avg merge
6d 11h
Merged PRs (30d)
7

Description

When trying to activate a Jupyter Notebook in tmux (running through the default `Terminal.app`), I receive the error
```
~/Documents/Projects/personal-website(master) » jupyter notebook julian@macbook
[I 21:33:50.138 NotebookApp] Serving notebooks from local directory: /Users/julian/Documents/Projects/personal-website
[I 21:33:50.138 NotebookApp] The Jupyter Notebook is running at:
[I 21:33:50.138 NotebookApp] http://localhost:8888/?token=d4839c5e9500cc860a1fecdf394c4ab71ebfed2f7cacabd2
[I 21:33:50.138 NotebookApp] or http://127.0.0.1:8888/?token=d4839c5e9500cc860a1fecdf394c4ab71ebfed2f7cacabd2
[I 21:33:50.138 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
Traceback (most recent call last):
File "/usr/local/bin/jupyter-notebook", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.8/site-packages/jupyter_core/application.py", line 270, in launch_instance
return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
File "/usr/local/lib/python3.8/site-packages/traitlets/config/application.py", line 664, in launch_instance
app.start()
File "/usr/local/lib/python3.8/site-packages/notebook/notebookapp.py", line 1936, in start
self.launch_browser()
File "/usr/local/lib/python3.8/site-packages/notebook/notebookapp.py", line 1867, in launch_browser
browser = webbrowser.get(self.browser or None)
File "/usr/local/Cellar/python@3.8/3.8.3_2/Frameworks/Python.framework/Versions/3.8/lib/python3.8/webbrowser.py", line 42, in get
register_standard_browsers()
File "/usr/local/Cellar/python@3.8/3.8.3_2/Frameworks/Python.framework/Versions/3.8/lib/python3.8/webbrowser.py", line 587, in register_standard_browsers
cmd = _synthesize(cmdline, preferred=True)
File "/usr/local/Cellar/python@3.8/3.8.3_2/Frameworks/Python.framework/Versions/3.8/lib/python3.8/webbrowser.py", line 127, in _synthesize
if controller and name.lower() == controller.basename:
AttributeError: 'MacOSXOSAScript' object has no attribute 'basename'
```

I haven't been able to find much information online. I tried installing through `conda`, `pip`, and `pip --user`. All three of these fail, both in my conda base env and outside of it.

Contributor guide

Open the contributing guide

Research direction

Start with notebook/notebookapp.py at launch_browser and Python's webbrowser.py registration path shown in the traceback. Reproduce the Jupyter Notebook launch from tmux on macOS 10.15.5, then verify that it starts without the MacOSXOSAScript AttributeError and preserves the reported browser-launch behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
jupyter-notebook, macos, python
Domain
backend, desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.