-
-
Notifications
You must be signed in to change notification settings - Fork 162
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
Returned songs have NoneType Lyrics. No Lyrics are returned #155
Comments
I fixed this by converting the lyrics to type String using str(). I had the same issue my website depended on it |
Here's a code snippet of what I mean @johnwmillr @samlidippos
|
Your fix will only convert a NoneType object to a string with the value of |
It worked for me- my site worked after I did that but you’re most likely right and nice that it’s fixed for the next update, thanks I didn’t know that. |
Hm thanks for the suggestions guys, however I tried updating to version 1.8.10, converting to str(), but no luck. Now I tried running again:
and I got:
Is there anything I am missing? It seems like the 'artist_info' dictionary is None. |
That probably happened because the request that was supposed to return the |
You are totally right about the token. I have corrected it and now I don't get an error. However still no lyrics are returned. In order to check it on an given example I ran:
and got:
I have tried with my previous example (with "Rihanna") as well, but still the returned songs have no lyrics (i.e. the "lyrics" field inside the returned dictionary is empty). I will also try to make the calls to the api manually (without the current lib), and see whether scraping via beautiful soup, might help. However, if you have any other idea what I might be missing, feel free to post it. |
Aha! So I should keep an eye out during the following period for that? |
Yes, but you don't need to check the PRs yourself. You could click the |
Thnx a lot! |
Thank you, @allerter! We'll have the PRs merged soon, @samlidippos. |
The issue has been resolved in version 2.0.0 |
Hi there!
I would like to use this library to get lyrics of a bunch of songs, and perform some NLP experiments. I have successfully created an API client through genius.com, and got the credentials along with the client access token. However, when I try to get some Rihanna's songs' lyrics, I only get NoneType Objects. Below is the super simple code I have used to get the lyrics:
And the printed result is:
All the 10 collected songs, have a field called 'lyrics' but all of them are empty. More specifically is of type 'NoneType object of builtins module'.
What am I doing wrong? Thanks in advance!
The text was updated successfully, but these errors were encountered: