Message376672
The following code does not work on many OSX installations of Python via homebrew:
>>> import webbrowser
>>> webbrowser.open("http://www.google.com")
And throws the following error stack trace:
File "/usr/local/opt/python@3.8/Frameworks/Python.framework/Versions/3.8/lib/python3.8/webbrowser.py", line 26, in register
register_standard_browsers()
File "/usr/local/opt/python@3.8/Frameworks/Python.framework/Versions/3.8/lib/python3.8/webbrowser.py", line 551, in register_standard_browsers
raw_result = subprocess.check_output(cmd, stderr=subprocess.DEVNULL)
File "/usr/local/opt/python@3.8/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py", line 411, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/usr/local/opt/python@3.8/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py", line 489, in run
with Popen(*popenargs, **kwargs) as process:
File "/usr/local/opt/python@3.8/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py", line 854, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/local/opt/python@3.8/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py", line 1702, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
NotADirectoryError: [Errno 20] Not a directory: 'xdg-settings'
The only workaround right now is to modify webbrowser.py via the instructions here: https://github.com/jupyter/notebook/issues/3746#issuecomment-489259515.
Thank you for resolving. |
|
Date |
User |
Action |
Args |
2020-09-10 06:15:31 | tony.diloreto | set | recipients:
+ tony.diloreto, ronaldoussoren, ned.deily |
2020-09-10 06:15:31 | tony.diloreto | set | messageid: <1599718531.77.0.777287973454.issue41754@roundup.psfhosted.org> |
2020-09-10 06:15:31 | tony.diloreto | link | issue41754 messages |
2020-09-10 06:15:31 | tony.diloreto | create | |
|