jbh-cloud/spotify_sync

authorize_spotify() got an unexpected keyword argument 'force'

KoenML opened this issue · 3 comments

KoenML commented

When trying to run the authorisation, I get the following stack trace:

Traceback (most recent call last):                                                                                        
File "/home/koen/.local/bin/spotify_sync", line 8, in <module>                                                            
    sys.exit(cli())                                                                                                       
File "/home/koen/.local/lib/python3.10/site-packages/click/core.py", line 1130, in __call__                               
    return self.main(*args, **kwargs)                                                                                     
File "/home/koen/.local/lib/python3.10/site-packages/click/core.py", line 1055, in main                                   
    rv = self.invoke(ctx)                                                                                                 
File "/home/koen/.local/lib/python3.10/site-packages/click/core.py", line 1657, in invoke                                 
    return _process_result(sub_ctx.command.invoke(sub_ctx))                                                               
File "/home/koen/.local/lib/python3.10/site-packages/click/core.py", line 1657, in invoke                                 
    return _process_result(sub_ctx.command.invoke(sub_ctx))                                                              
File "/home/koen/.local/lib/python3.10/site-packages/click/core.py", line 1404, in invoke                                 
    return ctx.invoke(self.callback, **ctx.params)                                                                        
File "/home/koen/.local/lib/python3.10/site-packages/click/core.py", line 760, in invoke                                  
    return __callback(*args, **kwargs)                                                                                  
TypeError: authorize_spotify() got an unexpected keyword argument 'force'

I'm using a valid config/profile so that shouldn't be the problem

Hey, assuming you're trying to run spotify_sync utils authorize-spotify --force this is a bug. As a workaround, you can manually remove the cached oauth token..

There a file in the persistent data folder (spotify_sync config list-paths) for your profile in the format of .spotify-oauth-cache-${USERID}

Once removed, just run the authorize-spotify command as normal without the force option.

KoenML commented

Apologies, this was more of an issue that I had thought.

Just released version 1.1.1 which should have fixed this, upgrade your existing via:

python3 -m pip install -U spot_sync