Closed ahxxm closed 8 months ago
sorry I forgot to update the description, it could be WSL(detectable through environment variables I think? not familiar with what Microsoft guarantees) or another headless environment like a server(I've no clue how to detect)
for now, the library spotipy
doesn't open a browser, it silently skips this step and directly asks for the redirect URL as if I've authorized with that tab
after the change the library will give me a link for authorization
How about sys.stdin.isatty()
? Does that detect your environment?
it returns True
on my VPS, does it return False
for you or when the library can open a new browser tab?
Hi man, sorry to close this, but there's a better way: https://stackoverflow.com/a/39371956/5726546
I'll add it and hope it solves your problem as well :)
Honestly I'd prefer to detect this situation and act accordingly instead of introducing some environment variable.
What issues are you having in WSL? If they are valid, can't we just detect WSL?