Search code examples
pythonpython-webbrowser

Why won't Python webbrowser module work properly?


Ok, some background info: I'm using the most recent version of Python 3 and Visual Studio Code. I'm on the most recent version of Windows 10 and all of my browsers are up to date.

I've been trying to use the webbrowser() module of Python, but it gives me this: AttributeError: module 'webbrowser' has no attribute 'open' When I have this in the code: webbrowser.open("https://docs.google.com/slides", new=1)

What do I with this? I understand that it means that "open" doesn't exist, but it worked about a month ago. Was there an update to the module?


Solution

  • Just so everyone knows: If you're importing a module into python, don't name a separate file as the same name as the module.(Ex: webbrowser.py, random.py, math.py)