{"id":28226,"library":"spotifytracker","title":"SpotifyTracker","description":"Track your Spotify play history by fetching recently played tracks and storing them locally. Version 0.0.18 is in early development; releases are sporadic.","status":"active","version":"0.0.18","language":"python","source_language":"en","source_url":"https://github.com/eriktaubeneck/spotifytracker","tags":["spotify","tracking","play-history","music"],"install":[{"cmd":"pip install spotifytracker","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"HTTP requests to Spotify API","package":"requests","optional":false}],"imports":[{"note":"Common mistake: direct module import does not expose the class","wrong":"import spotifytracker","symbol":"SpotifyTracker","correct":"from spotifytracker import SpotifyTracker"}],"quickstart":{"code":"from spotifytracker import SpotifyTracker\nimport os\n\nclient_id = os.environ.get('SPOTIFY_CLIENT_ID', '')\nclient_secret = os.environ.get('SPOTIFY_CLIENT_SECRET', '')\n\nif not client_id or not client_secret:\n    raise ValueError(\"Set SPOTIFY_CLIENT_ID and SPOTIFY_CLIENT_SECRET environment variables\")\n\ntracker = SpotifyTracker(client_id, client_secret)\ntracker.run()","lang":"python","description":"Minimal example: authenticate and start tracking play history."},"warnings":[{"fix":"Ensure your Spotify app has the scope enabled and you pass correct credentials.","message":"The library requires Spotify API credentials with the 'user-read-recently-played' scope. Without it, no data is fetched and no error is raised.","severity":"gotcha","affected_versions":"all"},{"fix":"Wrap with timeout or run in a separate thread if non-blocking behavior is needed.","message":"run() blocks indefinitely; there is no built-in way to stop gracefully except KeyboardInterrupt. The library does not support async or background threads.","severity":"gotcha","affected_versions":"all"},{"fix":"Use 'access_token' instead of 'token' when instantiating SpotifyTracker.","message":"The constructor parameter 'token' was renamed to 'access_token' in v0.0.15. Old code using 'token' will break.","severity":"deprecated","affected_versions":">=0.0.15"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Use 'from spotifytracker import SpotifyTracker'","cause":"Importing the module directly without the class.","error":"AttributeError: module 'spotifytracker' has no attribute 'SpotifyTracker'"},{"fix":"Replace 'token=' with 'access_token=' in SpotifyTracker instantiation.","cause":"The 'token' parameter was renamed to 'access_token'.","error":"TypeError: __init__() got an unexpected keyword argument 'token'"},{"fix":"Verify your Spotify Developer Dashboard settings and re-set environment variables.","cause":"The provided client_id or client_secret is incorrect or the Spotify app is not configured to use the redirect URI.","error":"spotifytracker.exceptions.AuthenticationError: Invalid client"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}