Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] KeyError: 'tag_name' #74

Open
pandalanax opened this issue Dec 4, 2022 · 0 comments
Open

[BUG] KeyError: 'tag_name' #74

pandalanax opened this issue Dec 4, 2022 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@pandalanax
Copy link

Describe the bug
When executing savify it tries to fetch updates from https://api.github.com/repos/LaurenceRawlings/savify/releases/latest which in my case i was rate limited.

I guess i was rate limited because my script looked like this:

cat tracks_v1.txt | while read line 
do
    savify $line -g "%artist%/%album%" -q best -f mp3  -o ~/Desktop/music_v1
done

so the function check_for_updates() gets called for every single line in that text file.

Expected behavior
Do not check for updates when the command is issued. Instead let the user look for updates himself.

Screenshots

Script:

[INFO]  Checking for updates...
Traceback (most recent call last):
  File "spotify_downloader.py", line 16, in <module>
    s = Savify(api_credentials=api_creds,
  File "/home/oskar/.local/lib/python3.8/site-packages/savify/savify.py", line 80, in __init__
    self.check_for_updates()
  File "/home/oskar/.local/lib/python3.8/site-packages/savify/savify.py", line 84, in check_for_updates
    latest_ver = requests.get('https://api.github.com/repos/LaurenceRawlings/savify/releases/latest').json()[
KeyError: 'tag_name'

Response from https://api.github.com/repos/LaurenceRawlings/savify/releases/latest link:

{"message":"API rate limit exceeded for XXX.XXX.XXX.XXX. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)","documentation_url":"https://docs.github.com/rest/overview/resources-in-the-rest-api#rate-limiting"}

Desktop:

  • OS: ubuntu
  • Version [2.3.4

QUICK FIX
cloned the repo and uncomment line https://github.com/LaurenceRawlings/savify/blob/main/savify/savify.py#L80

@pandalanax pandalanax added the bug Something isn't working label Dec 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants