question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Returned songs have NoneType Lyrics. No Lyrics are returned

See original GitHub issue

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:

import lyricsgenius

genius = lyricsgenius.Genius('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', skip_non_songs=True, excluded_terms=["(Remix)", "(Live)"], remove_section_headers=True)

artist = genius.search_artist("Rihanna", max_songs=10, sort="popularity")
for song in artist.songs:
     print(song.lyrics)

And the printed result is:

Searching for songs by Rihanna...

Song 1: "Work"
Song 2: "Needed Me"
Song 3: "Love on the Brain"
Song 4: "Stay"
Song 5: "Kiss it Better"
Song 6: "Sex with Me"
Song 7: "Bitch Better Have My Money"
"Bad (Remix)" is not valid. Skipping.
Song 8: "Consideration"
Song 9: "Diamonds"
Song 10: "Desperado"

Reached user-specified song limit (10).
Done. Found 10 songs.

None
None
None
None
None
None
None
None
None
None

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!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:13 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
johnwmillrcommented, Aug 31, 2020

Thank you, @Allerter! We’ll have the PRs merged soon, @samlidippos.

1reaction
samlidipposcommented, Aug 31, 2020

Thnx a lot!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error while scraping website using BeautifulSoup
Show activity on this post. returns correctly the lyric of the song. Both pages have the same layout. Can someone help me figuring...
Read more >
lyrics: If none are found, it exits with `AttributeError: 'NoneType ...
Problem I search manually for lyrics of a specific track and It exits with ... AttributeError: 'NoneType' object has no attribute 'artist' ...
Read more >
Scraping song lyrics from Genius.com - John W. Miller
With a little help from Beautiful Soup though, it's possible to grab the song lyrics without too much extra work.
Read more >
Come Back As A Country Boy (Official Music Video) - YouTube
Blake Shelton continues to add to his superstar status with his new ... the Country Digital Song Sales chart, also marking his 28th...
Read more >
Depeche Mode - Strangelove (Official Video) - YouTube
Depeche Mode - "Strangelove" (Official Video) directed by Anton CorbijnOriginal song from the ' Music for the Masses' album (Sire/Mute ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found