[PR #30] [CLOSED] Fixed browser opening issue #731

Closed
opened 2026-02-28 00:01:24 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/spotipy-dev/spotipy/pull/30
Author: @sepehr
Created: 10/8/2014
Status: Closed

Base: masterHead: master


📝 Commits (2)

  • d9992ee Fixed browser opening issue
  • c7f8d25 Suppressing webbrowser's output to stderr as well.

📊 Changes

1 file changed (+20 additions, -8 deletions)

View changed files

📝 spotipy/util.py (+20 -8)

📄 Description

There is an i-donno-what issue when spotipy.uitl.prompt_for_user_token() tries to open the browser using the subprocess.call. #29 issue might be related to this.

This pull request intends to fix this by utilizing webbrowser.open instead. It also works around the unnecessary verbose output of webbrowser.open and programmatically redirects it to the /dev/null.

The code is tested on both OSX and Linux.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/spotipy-dev/spotipy/pull/30 **Author:** [@sepehr](https://github.com/sepehr) **Created:** 10/8/2014 **Status:** ❌ Closed **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (2) - [`d9992ee`](https://github.com/spotipy-dev/spotipy/commit/d9992eebb806a88b5247688d46d05ea4d86480bb) Fixed browser opening issue - [`c7f8d25`](https://github.com/spotipy-dev/spotipy/commit/c7f8d25c39747f52bb73b62b96ca19ddbafe86fc) Suppressing webbrowser's output to stderr as well. ### 📊 Changes **1 file changed** (+20 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `spotipy/util.py` (+20 -8) </details> ### 📄 Description There is an i-donno-what issue when `spotipy.uitl.prompt_for_user_token()` tries to open the browser using the `subprocess.call`. #29 issue might be related to this. This pull request intends to fix this by utilizing `webbrowser.open` instead. It also works around the unnecessary verbose output of `webbrowser.open` and programmatically redirects it to the `/dev/null`. The code is tested on both OSX and Linux. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-28 00:01:24 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotipy#731
No description provided.