Here's the breakdown of my Windows WSL environment:
- Windows 11
- WSL version 2
- Ubuntu version 20.04.3 LTS
- Python 3.8.10
I have a super simple Python program I'm using to open a web page in my default browser.
Here is my code:
import webbrowser
webbrowser.open('https://github.com')
When I run this from my terminal the webpage opens up as expected, but I also get this error in the terminal:
tcgetpgrp failed: Not a tty
When my terminal displays this message, the cursor goes down to the next line and it looks like a process is hung or something. To be able to use the terminal I have to Ctrl+C to get it to give me the command prompt.
I looked for answers and everything I could find has to do with using Jupyter or PHP but I'm not using either of them, I'm just using plain old Python to try and open the browser.
Can anyone tell me what the issue is here and how to fix this/prevent it from happening?