-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
lyrics: If none are found, it exits with `AttributeError: 'NoneType' object has no attribute 'artist' #2805
Comments
Thanks! This does look like a problem. However, it looks like it's not directly tied to missing the lyrics for a specific album; instead, this crash is happening at the end of the process, after emitting all the lyrics for the matched set of items. That call to if item is None or slug(self.artist) != slug(item.artist):
if self.rest is not None:
path = os.path.join(directory, 'artists',
slug(self.artist) + u'.rst')
with open(path, 'wb') as output:
output.write(self.rest.encode('utf-8'))
self.rest = None
if item is None:
return
self.artist = item.artist.strip() Saliently, the final line tries to access @anarcat, can you please take a look? |
following, I have the same issue |
Note you can use the "subscribe" button at the side bar (desktop) or at the bottom of the page (mobile) instead of commenting and thus notifying everyone else subscribed :)
|
is there any workaround for this? |
Is there a fix for this yet? |
I have got a similar error:
After disabling 'genius' in the sources list in config.yaml lyrics runs through without any error. So I guess in my case it has something to do with 'genius'. |
+1 same error as @jimbo27 |
Quick fix in the code just to prevent the error, which does not fix the problem with Genius:
|
+1 same error as @jimbo27. Applying the quick fix from @Linkandzelda worked for me. |
Hi! Would any of you be willing to open a pull request with this fix? Thanks!! |
I would suggest investigating it further since all the fix does is return an empty string and only targets @jimbo27 and my error. If there is an underlying problem with Genius lyrics and lyrics is always None, it will always return an empty string. |
Just a quick comment to say that in the end I've built my own python tool JUST to scrape lyrics, inspired from this beets module. Supported is Genius, MusixMatch, LyricsWorld, FlashLyrics, LyricsFreak, Decoda, SongLyrics, Lyrics24 and MetroLyrics also added support for automatically redirect certain titles (ie, when searching for "DAFT PUNK VS MODJO - One More Lady - DJ Stein Mix" , search for "MODJO - Lady" instead |
The Genius issue was already fixed in #3554, can't replicate it anymore. |
Fix item == None issues when writing lyrics ReST (issue #2805)
EDIT: Nevermind I don't think I trust tekstowo for lyrics anyway |
Problem
I search manually for lyrics of a specific track and It exits with the following traceback:
Setup
3.6.4
1.4.6
My configuration (output of
beet config
) is:The text was updated successfully, but these errors were encountered: