Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

WSL doesn't redirect me to google chrome

In order for my script to run successfully, I need to insert the URL of the site that the API redirected me to. Everything works in my Windows Powershell, I run my code and my Google Chrome tab opens, I successfully copy the address and you’re done. But when I run this code on WSL(Windows Subsystem for Linux) absolutely nothing happens. Perhaps he has some permissions to use Chrome? He certainly has access to the Internet.

I tried searching for "Chrome WSL Access" but didn’t find anything helpful.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

It looks like you’re running some code that eventually calls the spotipy/oauth2.py#L432, which has this line in it:

def _open_auth_url(self):
    ...
    webbrowser.open(auth_url)
    ...

I suspect the issue is due to webbrowser not currently working with WSL, which is tracked in this issue:
https://github.com/python/cpython/issues/89752

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading