nengo / nengo-gui

Nengo interactive visualizer
Other
95 stars 38 forks source link

Gracefully handle having no default browser #995

Open tbekolay opened 5 years ago

tbekolay commented 5 years ago

From @xchoo in https://github.com/nengo/nengo/issues/1478:

When nengo doesn't detect a browser it can automatically open it throws this error and quits:

Traceback (most recent call last):
  File "/home/xchoo/miniconda2/envs/inrc/bin/nengo", line 11, in <module>
    sys.exit(main())
  File "/home/xchoo/miniconda2/envs/inrc/lib/python3.5/site-packages/nengo_gui/main.py", line 123, in main
    wb = webbrowser.get()
  File "/home/xchoo/miniconda2/envs/inrc/lib/python3.5/webbrowser.py", line 51, in get
    raise Error("could not locate runnable browser")
webbrowser.Error: could not locate runnable browser

I propose changing the behaviour to run in --no-browser mode instead (similar to what jupyter notebook does when it doesn't find a runnable browser)

xchoo commented 5 years ago

Whoops! Hahaha. 🤣 Thanks for moving this to the right place.