** Changed in: openlp/trunk
Milestone: 2.1.1 => None
--
You received this bug notification because you are a member of OpenLP
Core, which is subscribed to OpenLP.
https://bugs.launchpad.net/bugs/1194730
Title:
[support-system] Non existing chapters reseult in traceback when
searching webbibles
Status in OpenLP - Worship Presentation Software:
Invalid
Status in OpenLP 2.0 series:
Fix Released
Status in OpenLP trunk series:
Invalid
Bug description:
Hello,
http://support.openlp.org/issues/2006
====PART 1====
1) Register the New Living Translation from biblegateway.
2) Search 2 Samuel 25
Result:
Traceback (most recent call last):
File
"/home/andreas/Projects/OpenLP/trunk/openlp/plugins/bibles/lib/mediaitem.py",
line 656, in onQuickSearchButton
self.search_results = self.plugin.manager.get_verses(bible, text)
File
"/home/andreas/Projects/OpenLP/trunk/openlp/plugins/bibles/lib/manager.py",
line 300, in get_verses
return self.db_cache[bible].get_verses(reflist, show_error)
File
"/home/andreas/Projects/OpenLP/trunk/openlp/plugins/bibles/lib/http.py", line
608, in get_verses
search_results = self.get_chapter(book, reference[1])
File
"/home/andreas/Projects/OpenLP/trunk/openlp/plugins/bibles/lib/http.py", line
636, in get_chapter
return handler.get_bible_chapter(self.download_name, book, chapter)
File
"/home/andreas/Projects/OpenLP/trunk/openlp/plugins/bibles/lib/http.py", line
245, in get_bible_chapter
self._clean_soup(div)
File
"/home/andreas/Projects/OpenLP/trunk/openlp/plugins/bibles/lib/http.py", line
127, in _clean_soup
self._remove_elements(tag, 'sup', 'crossreference')
File
"/home/andreas/Projects/OpenLP/trunk/openlp/plugins/bibles/lib/http.py", line
86, in _remove_elements
all_tags = parent.find_all(tag, class_)
AttributeError: 'NoneType' object has no attribute 'find_all'
Expected:
Nothing should happen, because this chapter does not exist.
===PART2===
1) Search for 2 Samuel 1:88
Result:
Traceback (most recent call last):
File
"/home/andreas/Projects/OpenLP/trunk/openlp/plugins/bibles/lib/mediaitem.py",
line 656, in onQuickSearchButton
self.search_results = self.plugin.manager.get_verses(bible, text)
File
"/home/andreas/Projects/OpenLP/trunk/openlp/plugins/bibles/lib/manager.py",
line 300, in get_verses
return self.db_cache[bible].get_verses(reflist, show_error)
File
"/home/andreas/Projects/OpenLP/trunk/openlp/plugins/bibles/lib/http.py", line
608, in get_verses
search_results = self.get_chapter(book, reference[1])
File
"/home/andreas/Projects/OpenLP/trunk/openlp/plugins/bibles/lib/http.py", line
636, in get_chapter
return handler.get_bible_chapter(self.download_name, book, chapter)
File
"/home/andreas/Projects/OpenLP/trunk/openlp/plugins/bibles/lib/http.py", line
252, in get_bible_chapter
verse_list = self._extract_verses(span_list)
File
"/home/andreas/Projects/OpenLP/trunk/openlp/plugins/bibles/lib/http.py", line
149, in _extract_verses
c_verse, c_text = self._extract_verse(child)
File
"/home/andreas/Projects/OpenLP/trunk/openlp/plugins/bibles/lib/http.py", line
101, in _extract_verse
elif tag.get('class')[0] == "versenum" or tag.get('class')[0] ==
'versenum mid-line':
TypeError: 'NoneType' object has no attribute '__getitem__'
Expected:
Nothing, the verse does not exist.
NOTE:
The tracebacks are ONLY shown, when the chapter was not already downloaded!
To manage notifications about this bug go to:
https://bugs.launchpad.net/openlp/+bug/1194730/+subscriptions
_______________________________________________
Mailing list: https://launchpad.net/~openlp-core
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openlp-core
More help : https://help.launchpad.net/ListHelp