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

Lyrics plugin crashing on tekstowo.pl #3904

Closed
njelich opened this issue Apr 11, 2021 · 6 comments · Fixed by #3905
Closed

Lyrics plugin crashing on tekstowo.pl #3904

njelich opened this issue Apr 11, 2021 · 6 comments · Fixed by #3905
Labels
bug bugs that are confirmed and actionable

Comments

@njelich
Copy link

njelich commented Apr 11, 2021

I just found it crashing while searching tekstowo.pl (I'm on afc0728).

These are the relevant lines of error.

    return html.find("div", class_="song-text").get_text()
AttributeError: 'NoneType' object has no attribute 'get_text'

I also printed the html to the console, but I am unsure why the error is appearing. The div with the class song-text seems to exist and I've never worked on beets before. Could it have something to do with there being two divs with the class?

I uploaded the html, but had to do it with txt extension due to GitHub limitations.

temp.txt

Originally posted by @njelich in #3903 (comment)

@wisp3rwind wisp3rwind added the bug bugs that are confirmed and actionable label Apr 11, 2021
@sampsyo
Copy link
Member

sampsyo commented Apr 11, 2021

Paging @xhocquet, as per the other issue.

@xhocquet
Copy link
Contributor

Looking!

@njelich
Copy link
Author

njelich commented Apr 12, 2021

The error is still happening with the new version.

@xhocquet
Copy link
Contributor

@njelich Would you mind giving me a specific track this is failing for?

@njelich
Copy link
Author

njelich commented Apr 12, 2021

I submitted an example earlier, the temp.txt file is the html excrept that the error occured on with the .find function.

I also noticed that the lyrics that do go through have "Tekst piosenki:" at the top and ""Historia edycji tekstu" at the bottom.

I don't think the commit done does anything that has to do with the actual issue I submitted. I'm taking a look myself as well, but I haven't worked with beautifulSoup yet.

@xhocquet
Copy link
Contributor

@njelich After parsing out your txt file to find the track/artist, Capitalist Casualties - Gig Violence, I was not able to reproduce your issue with the latest code (ignore the 'eye' piece of the file tags, I use that for convenience when I was testing other files but it is not used in the lyrics search):

[~/Coding/src/beets](tekstowo-fixes)$ beet -vv lyrics eye -p -f
user configuration: /Users/meesles/Library/Application Support/beets/config.yaml
data directory: /Users/meesles/Library/Application Support/beets
plugin paths:
Sending event: pluginload
library database: /Users/meesles/Library/Application Support/beets/library.db
library directory: /Users/meesles/Music
Sending event: library_opened
lyrics: got lyrics from backend: Tekstowo
lyrics: fetched lyrics: Capitalist Casualties - u n eye - Gig Violence
Sending event: write
Sending event: after_write
Sending event: database_change
Tekst piosenki:

Don't make us stop playing
We'll take you outside ourselves
& beat in your fucking face
Wrecking our gigs, keep your distance
Shut your trap & swallow your shit

Historia edycji tekstu
Sending event: cli_exit

[~/Coding/src/beets](tekstowo-fixes)$ beet ls eye -f '$lyrics'
Tekst piosenki:

Don't make us stop playing
We'll take you outside ourselves
& beat in your fucking face
Wrecking our gigs, keep your distance
Shut your trap & swallow your shit

Historia edycji tekstu

Lyrics search executes as expected without error and saves the lyrics to the file. If this is still an issue, can you please provide more information like the commands used, the stack of the issue, etc.? cc @sampsyo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bugs that are confirmed and actionable
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants