I tried that little function of webbrowser on a windows machine and it works, you might try reinstalling python on your machine.
If the error persist downgrade python.
Let me know if it works.