Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -9,8 +9,14 @@ from tempfile import NamedTemporaryFile
|
|
| 9 |
from openpyxl import Workbook
|
| 10 |
|
| 11 |
# Spotify API credentials from environment variables
|
| 12 |
-
client_ids = os.getenv("SPOTIFY_CLIENT_IDS")
|
| 13 |
-
client_secrets = os.getenv("SPOTIFY_CLIENT_SECRETS")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
current_api_index = 0
|
| 15 |
|
| 16 |
# Request counters
|
|
|
|
| 9 |
from openpyxl import Workbook
|
| 10 |
|
| 11 |
# Spotify API credentials from environment variables
|
| 12 |
+
client_ids = os.getenv("SPOTIFY_CLIENT_IDS")
|
| 13 |
+
client_secrets = os.getenv("SPOTIFY_CLIENT_SECRETS")
|
| 14 |
+
|
| 15 |
+
if not client_ids or not client_secrets:
|
| 16 |
+
raise ValueError("SPOTIFY_CLIENT_IDS or SPOTIFY_CLIENT_SECRETS environment variables not set.")
|
| 17 |
+
|
| 18 |
+
client_ids = client_ids.split(',')
|
| 19 |
+
client_secrets = client_secrets.split(',')
|
| 20 |
current_api_index = 0
|
| 21 |
|
| 22 |
# Request counters
|