mopidy / mopidy-spotify

Mopidy extension for playing music from Spotify
https://mopidy.com/ext/spotify/
Apache License 2.0
933 stars 109 forks source link

Using on PopOS and when I start I get this #300

Closed TrevorGilstrap closed 1 year ago

TrevorGilstrap commented 3 years ago

I have done my config file at the bottom added [spotify] username = username password = password client_id = clientid client_secret = clientsecret

and I get this error on start up still and nothing happens

`

ERROR    2021-01-17 13:08:56,192 [20679:SpotifyBackend-6] pykka
  Unhandled exception in SpotifyBackend (urn:uuid:fa24073e-54f0-40de-80c9-415973dfe69d):
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/requests/models.py", line 380, in prepare_url
    scheme, auth, host, port, path, query, fragment = parse_url(url)
  File "/usr/lib/python3/dist-packages/urllib3/util/url.py", line 392, in parse_url
    return six.raise_from(LocationParseError(source_url), None)
  File "<string>", line 2, in raise_from
urllib3.exceptions.LocationParseError: Failed to parse: https://auth.mopidy.com/spotify/token

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/lib/python3/dist-packages/pykka/_actor.py", line 186, in _actor_loop self.on_start() File "/usr/lib/python3/dist-packages/mopidy_spotify/backend.py", line 65, in on_start self._web_client.login() File "/usr/lib/python3/dist-packages/mopidy_spotify/web.py", line 424, in login self.user_id = self.get("me").get("id") File "/usr/lib/python3/dist-packages/mopidy_spotify/web.py", line 89, in get self._refresh_token() File "/usr/lib/python3/dist-packages/mopidy_spotify/web.py", line 124, in _refresh_token result = self._request_with_retries( File "/usr/lib/python3/dist-packages/mopidy_spotify/web.py", line 152, in _request_with_retries prepared_request = self._session.prepare_request( File "/usr/lib/python3/dist-packages/requests/sessions.py", line 449, in prepare_request p.prepare( File "/usr/lib/python3/dist-packages/requests/models.py", line 314, in prepare self.prepare_url(url, params) File "/usr/lib/python3/dist-packages/requests/models.py", line 382, in prepare_url raise InvalidURL(*e.args) requests.exceptions.InvalidURL: Failed to parse: https://auth.mopidy.com/spotify/token ERROR 2021-01-17 13:08:56,203 [20679:MainThread] mopidy.commands Actor died: SpotifyBackend (urn:uuid:fa24073e-54f0-40de-80c9-415973dfe69d) stopped before handling the message

`

kingosticks commented 1 year ago

Sorry you never got any help with this.

The URL https://auth.mopidy.com/spotify/token looks very reasonable so I don't understand why requests/urllib can't parse it. Please re-open this issue if it's still relevant and we'll look into it.