SongSelect Importer Crashes on Import
Bug #1800761 reported by
Raoul Snyman
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenLP |
Fix Committed
|
Low
|
Bob Luursema |
Bug Description
--- Exception Traceback ---
Traceback (most recent call last):
File "openlp/
on_view_
File "openlp/
File "openlp/
AttributeError: 'NoneType' object has no attribute 'find_all'
This seems to be caused by free accounts, which cannot download lyrics or music. Easy fix would be to check if the object is None and either not display any lyrics, or show an error message that the account is limited.
Related branches
lp:~bob-luursema/openlp/bug-1800761
- Tomas Groth: Approve
- Raoul Snyman: Approve
-
Diff: 188 lines (+48/-14)4 files modified.bzrignore (+1/-0)
openlp/plugins/songs/forms/songselectform.py (+11/-2)
openlp/plugins/songs/lib/songselect.py (+25/-5)
tests/functional/openlp_plugins/songs/test_songselect.py (+11/-7)
Changed in openlp: | |
importance: | Undecided → Low |
milestone: | none → 2.9.1 |
status: | New → Confirmed |
Changed in openlp: | |
assignee: | nobody → Bob Luursema (bob-luursema) |
Changed in openlp: | |
status: | Confirmed → Fix Committed |
To post a comment you must log in.
Hello, I'd like to contribute to OpenLP so I figured I might take a look at this issue.
I have reproduced the issue, and also found another one. After logging in with my newly created free account OpenLP wrongfully determined I wasn't logged in because it looked for a `input#SearchText` element, but that didn't exist because on the first page there is a question about joining an organization. So I changed the code to account for that situation.
The issue is indeed that a free account can't access most lyrics, but it can access lyrics that are published in the public domain. For the user it would be nice to be able to search just in the public domain in this case. we can add the `List=publicdomain` query parameter to the search to do that. The issue is that I can't find a way to determine what type of account the user has, I can only find the `div.subscripti onlevel` element, but that consists of a translated text, "Gratis" for me (Dutch).
If someone can supply me with the html of `https:/ /songselect. ccli.com/` for a paid account maybe I can figure something out, I hope that the CSS classes will be different for the `div.subscripti onlevel` element.
And another question, I think it would be nice for OpenLP to inform the user that they will only search in the public domain. Is there an example in the codebase for how I might do that? I am not familiar with PyQt.