I've looked online in numerous spots and it looks like I'm not the only person having this error on a mac running OS10.11.15 using python 3.5.2 and running the code in IDLE.
The weird thing is it worked once and then didn't work after that. I've tried restarting the Mac, shutting IDLE down and then using all sorts of commands I've found in the documentation and through sites like this. When I use:
webbrowser._tryorder
I get:
['MacOSX', 'firefox', 'safari']
When Chrome is my default browser and has been for ages.
I use:
webbrowser.get('/Applications/Google Chrome.app')
and this happens;
Traceback (most recent call last): File "", line 1, in webbrowser.get('/Applications/Google Chrome.app') File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/webbrowser.py", line 51, in get raise Error("could not locate runnable browser") webbrowser.Error: could not locate runnable browser
I then tried to regsiter the web browser Chrome using the list from the python docs and when I put the "update_tryorder=1" argument in, this happens;
webbrowser.register('chrome', None, update_tryorder = 1)
webbrowser._tryorder
['MacOSX', 'firefox', 'safari', 'chrome']
HELP !! I'm fairly new to Python and coding in general so won't even speculate as to what the issue is here. Thank you in advance !!