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.

Artist.save_lyrics failing

See original GitHub issue

Describe the bug Using the code artist.save_lyrics() I am given an error when running the script

Expected behavior I expected the lyrics of a chosen song to be saved to a file

To Reproduce Describe the steps required to reproduce the behavior. Use the following code:

import lyricsgenius as genius

api = genius.Genius("MY TOKEN") # Replaced my api token with "MY TOKEN"
artist = api.search_artist("Ariana Grande", max_songs=1)
song = api.search_song("thank u, next", artist.name)
artist.add_song(song)
artist.save_lyrics()

Include the error message associated with the bug.

Traceback (most recent call last):
  File "C:\Users\sebfa\PycharmProjects\TTS\main.py", line 8, in <module>
    artist.save_lyrics()
  File "C:\Users\sebfa\PycharmProjects\TTS\venv\lib\site-packages\lyricsgenius\artist.py", line 109, in save
_lyrics
    filename = "Lyrics_{}.{}".format(self.artist.replace(" ", ""), format_)
AttributeError: 'Artist' object has no attribute 'artist'

Version info

  • Package version: 1.0.0
  • OS: Windows 10

Additional context Add any other context about the problem here.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
robot3498712commented, Dec 7, 2018

@johnwmillr Thank you, I can confirm issue is fixed. Cheers!

1reaction
johnwmillrcommented, Dec 7, 2018

@robot3498712 hopefully #75 fixes this bug for you. I was using a sloppy method of accessing elements within the Song object’s self._body dictionary, causing an error when the requested field wasn’t present in the dict. Let me know if you do run into any more bugs!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Hillsong Worship – Mighty to Save Lyrics - Genius
[Verse 2] So take me as You find me. All my fears and failures. And fill my life again. I give my life...
Read more >
Mighty To Save - Hillsong - Lyrics.com
Mighty To Save Lyrics by Hillsong from the Live in Miami [DVD] album ... everyone needs compassion A love that's never failing, let...
Read more >
Mighty To Save – Hillsong Worship Lyrics and Chords
Free chords, lyrics, videos and other song resources for "Mighty To Save – Hillsong Worship" by ... failing. Let. E. mercy fall on...
Read more >
"Mighty to Save" Lyrics and Meaning Behind the Song by ...
"Mighty to Save" Lyrics. Ben Fielding, Reuben Morgan. Everyone needs compassion. A love that's never failing. Let mercy fall on me
Read more >
HALLAL MUSIC - MIGHTY TO SAVE LYRICS
Hallal Music - Mighty to Save Lyrics. Everyone needs compassion A love that's never failing Let mercy fall on me Everyone needs ......
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