Crosswalk importer uses different urls to book names

Bug #1827792 reported by simotsa
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenLP
Confirmed
Medium
Unassigned

Bug Description

OpenLP crash with the following error when using Crosswalk -> Chinese Union Version

Traceback (most recent call last):
  File "openlp\core\ui\wizard.py", line 216, in on_current_id_changed
  File "openlp\plugins\bibles\forms\bibleimportform.py", line 632, in perform_wizard
  File "openlp\plugins\bibles\lib\http.py", line 641, in do_import
  File "openlp\plugins\bibles\lib\db.py", line 312, in get_book_ref_id_by_name
  File "openlp\plugins\bibles\lib\db.py", line 878, in get_book_reference_id
  File "openlp\plugins\bibles\lib\db.py", line 858, in run_sql
  File "openlp\plugins\bibles\lib\db.py", line 839, in get_cursor
sqlite3.OperationalError: unable to open database file

Operating System: Windows 10 (32-bit)
OpenLP version 2.4.6

Tags: bible
Revision history for this message
Phill (phill-ridout) wrote :

Simotsa, have you resolved this issue? if not can you try deleting the bible database file.

Open the data folder ( http://manual.openlp.org/faq.html#id4 ) open bibles and delete the selected bible and try again.

Revision history for this message
simotsa (simotsa) wrote : Re: [Bug 1827792] Re: Bible Import Crashes OpenLP

Thank you,

I tried deleting %appdata%/openlp, and it imports fine now, but it failed
to read/extract the verse when selected in advanced search.

This only happens with the Traditional Chinese, I tried all 4 bibles, they
all have the same problem. Simplified Chinese have no issue.

On Thu, Aug 1, 2019 at 3:30 PM Phill <email address hidden> wrote:

> Simotsa, have you resolved this issue? if not can you try deleting the
> bible database file.
>
> Open the data folder ( http://manual.openlp.org/faq.html#id4 ) open
> bibles and delete the selected bible and try again.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1827792
>
> Title:
> Bible Import Crashes OpenLP
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/openlp/+bug/1827792/+subscriptions
>

Revision history for this message
Phill (phill-ridout) wrote : Re: Bible Import Crashes OpenLP

This error is caused because we assume that the book name is the same as that used in the url.

OpenLP gets the book name here:
https://bazaar.launchpad.net/~openlp-core/openlp/trunk/view/head:/openlp/plugins/bibles/lib/importers/http.py#L521
reading the content in the h4 tag, but in the case of the Chinese bible the book name does not match url component. Instead we should be getting that from anchor href tag:

<div class="panel-body">
    <a class="btn btn-lg btn-block bst-button-white" href="https://www.biblestudytools.com/cuv/chuangshiji/">
        <h4 class="small-header ">創世記</h4>
    </a>

Unfortunately its not that quite simple as the http importers currently make no provision for the url component being different to the book name, and there's no column in the db to store it.

Changed in openlp:
status: New → Confirmed
importance: Undecided → Medium
summary: - Bible Import Crashes OpenLP
+ Crosswalk importer uses different urls to book names
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.