openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #20834
[Bug 1194730] [NEW] [support-system] Non existing chapters reseult in traceback when searching webbibles
Public bug reported:
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!
** Affects: openlp
Importance: Medium
Status: Confirmed
** Affects: openlp/2.0
Importance: High
Status: Confirmed
** Affects: openlp/trunk
Importance: Medium
Status: Confirmed
** Tags: support-system
** Also affects: openlp/2.0
Importance: Undecided
Status: New
** Also affects: openlp/trunk
Importance: Undecided
Status: New
** Changed in: openlp/trunk
Milestone: None => 2.1.1
** Changed in: openlp/2.0
Milestone: None => 2.0.2
** Changed in: openlp/2.0
Importance: Undecided => Critical
** Changed in: openlp/2.0
Importance: Critical => High
** Changed in: openlp/2.0
Importance: High => Medium
** Changed in: openlp/trunk
Importance: Undecided => High
** Changed in: openlp/trunk
Importance: High => Medium
** Changed in: openlp/trunk
Status: New => Confirmed
** Changed in: openlp/2.0
Status: New => Confirmed
** Changed in: openlp/2.0
Importance: Medium => High
** Tags added: support-system
--
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:
Confirmed
Status in OpenLP 2.0 series:
Confirmed
Status in OpenLP trunk series:
Confirmed
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
Follow ups
References