Environmental variables not being detected in Space

I’m using the Spotify API and the Spotipy library on my project.

I saved my API Client ID and Client Secret as environmental variables. But when building my space, I always get

spotipy.oauth2.SpotifyOauthError: No client_id. Pass it or set a SPOTIPY_CLIENT_ID environment variable.

this error.

import spotipy
from spotipy.oauth2 import SpotifyClientCredentials

client_id = os.environ.get("SPOTIPY_CLIENT_ID")
client_secret = os.environ.get("SPOTIPY_CLIENT_SECRET")

sp = spotipy.Spotify(client_credentials_manager=SpotifyClientCredentials(client_id=client_id, client_secret=client_secret))

This is the code I’m using to get it, what do I need to change?