[PR #173] [MERGED] Fix execution on headless systems where webbrowser module may not be available #801

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

📋 Pull Request Information

Original PR: https://github.com/spotipy-dev/spotipy/pull/173
Author: @shantanugoel
Created: 3/21/2017
Status: Merged
Merged: 9/17/2017
Merged by: @plamere

Base: masterHead: fix_headless_execution


📝 Commits (1)

  • ab2f52e Fix execution on headless systems where webbrowser module may not be present

📊 Changes

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

View changed files

📝 spotipy/util.py (+1 -1)

📄 Description

On several headless systems (including but not limited to optware, entware packages for NASs, routers, etc), python builds do not include webbrowser module to save space since there's no browser on these systems.
As mentioned in #170, currently spotipy does not run on these systems because it fails in the import statement. This fix will allow spotipy to run well on headless systems as well.
I've tested it to work on my linux PC as well as on my Asus routers (optware and entware) and Synology NAS (entware and synology python).


🔄 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/173 **Author:** [@shantanugoel](https://github.com/shantanugoel) **Created:** 3/21/2017 **Status:** ✅ Merged **Merged:** 9/17/2017 **Merged by:** [@plamere](https://github.com/plamere) **Base:** `master` ← **Head:** `fix_headless_execution` --- ### 📝 Commits (1) - [`ab2f52e`](https://github.com/spotipy-dev/spotipy/commit/ab2f52e81a16c6fd8968a044ea6e691e5f3da301) Fix execution on headless systems where webbrowser module may not be present ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `spotipy/util.py` (+1 -1) </details> ### 📄 Description On several headless systems (including but not limited to optware, entware packages for NASs, routers, etc), python builds do not include webbrowser module to save space since there's no browser on these systems. As mentioned in #170, currently spotipy does not run on these systems because it fails in the import statement. This fix will allow spotipy to run well on headless systems as well. I've tested it to work on my linux PC as well as on my Asus routers (optware and entware) and Synology NAS (entware and synology python). --- <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:49 +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#801
No description provided.