b4ird / spotify_sync

A schedulable, configurable CLI downloader for Spotify accounts
MIT License
182 stars 8 forks source link

authorize_spotify() got an unexpected keyword argument 'force' #18

Closed KoenML closed 1 year ago

KoenML commented 1 year ago

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

jbh-cloud commented 1 year ago

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 1 year ago

I've actually been trying to use it the usual way, been getting the error when doing either

spotify_sync utils authorize_spotify --profile prof

or

spotify_sync utils authorize_spotify --config config.json

Op 4 feb. 2023 21:03 schreef James BH @.***>:

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.

— Reply to this email directly, view it on GitHubhttps://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fjbh-cloud%2Fspotify_sync%2Fissues%2F18%23issuecomment-1416838476&data=05%7C01%7CKoen.Luyten%40ugent.be%7C3c6c6eb99ad8424e5b0a08db06eada78%7Cd7811cdeecef496c8f91a1786241b99c%7C1%7C0%7C638111377977979400%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=d31%2FQFdislt8x7tUEjJqB9g6zsP2qc2R8Lh8R5TlQK8%3D&reserved=0, or unsubscribehttps://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAMU7752WBISNLKV7TFIV7EDWV2YYFANCNFSM6AAAAAAURGLPN4&data=05%7C01%7CKoen.Luyten%40ugent.be%7C3c6c6eb99ad8424e5b0a08db06eada78%7Cd7811cdeecef496c8f91a1786241b99c%7C1%7C0%7C638111377977979400%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=5EYaUDfcnOCoAp6IDKOItixGzEGJnZP%2BKp6EC8B50ro%3D&reserved=0. You are receiving this because you authored the thread.Message ID: @.***>

jbh-cloud commented 1 year ago

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