Skip to content

AttributeError: 'NoneType' object has no attribute 'group' #65

Description

@0-wiz-0

I've been using this for quite some time, but today it wasn't working any longer. Login went fine, 'you can close this window now' but the actual download failed with:

[04:02:43] Logging in (click if it doesn't open automatically): https://accounts.spotify.com/authorize?response_type=token&client_id=XXX&scope=playlist-read-private+playlist-read-collaborative+user-library-read&redirect_
uri=http%3A%2F%2F127.0.0.1%3A43019%2Fredirect
Traceback (most recent call last):
  File "spotify-backup/./spotify-backup.py", line 221, in <module>
    main()
    ~~~~^^
  File "spotify-backup/./spotify-backup.py", line 151, in main
    spotify = SpotifyAPI.authorize(client_id='XXX',
                                   scope='playlist-read-private playlist-read-collaborative user-library-read')
  File "spotify-backup/./spotify-backup.py", line 80, in authorize
    server.handle_request()
    ~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/pkg/lib/python3.14/socketserver.py", line 298, in handle_request
    return self._handle_request_noblock()
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/pkg/lib/python3.14/socketserver.py", line 320, in _handle_request_noblock
    self.handle_error(request, client_address)
    ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/pkg/lib/python3.14/socketserver.py", line 318, in _handle_request_noblock
    self.process_request(request, client_address)
    ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/pkg/lib/python3.14/socketserver.py", line 349, in process_request
    self.finish_request(request, client_address)
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/pkg/lib/python3.14/socketserver.py", line 362, in finish_request
    self.RequestHandlerClass(request, client_address, self)
    ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/pkg/lib/python3.14/socketserver.py", line 766, in __init__
    self.handle()
    ~~~~~~~~~~~^^
  File "/usr/pkg/lib/python3.14/http/server.py", line 496, in handle
    self.handle_one_request()
    ~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/pkg/lib/python3.14/http/server.py", line 484, in handle_one_request
    method()
    ~~~~~~^^
  File "spotify-backup/./spotify-backup.py", line 113, in do_GET
    access_token = re.search('access_token=([^&]*)', self.path).group(1)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'group'

Did the API change or is there a problem with my login (that wasn't there before)?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions