← Back to team overview

openlp-core team mailing list archive

[Bug 1748722] [NEW] Unable to query for bibles through the remote

 

Public bug reported:

Using OpenLP 2.4.6 the remote is currently unable to query bibles.

It seems to be a threading issue, here is a trace I encountered:

----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 36114)
Traceback (most recent call last):
  File "/usr/lib/python3.6/socketserver.py", line 639, in process_request_thread
    self.finish_request(request, client_address)
  File "/usr/lib/python3.6/socketserver.py", line 361, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib/python3.6/socketserver.py", line 696, in __init__
    self.handle()
  File "/usr/lib/python3.6/http/server.py", line 418, in handle
    self.handle_one_request()
  File "/usr/lib/python3.6/http/server.py", line 406, in handle_one_request
    method()
  File "/usr/lib/python3.6/site-packages/openlp/plugins/remotes/lib/httpserver.py", line 64, in do_GET
    self.do_post_processor()
  File "/usr/lib/python3.6/site-packages/openlp/plugins/remotes/lib/httprouter.py", line 200, in do_post_processor
    self.call_function(function, *args)
  File "/usr/lib/python3.6/site-packages/openlp/plugins/remotes/lib/httprouter.py", line 209, in call_function
    response = function['function'](*args)
  File "/usr/lib/python3.6/site-packages/openlp/plugins/remotes/lib/httprouter.py", line 660, in search
    results = plugin.media_item.search(text, False)
  File "/usr/lib/python3.6/site-packages/openlp/plugins/bibles/lib/mediaitem.py", line 964, in search
    search_results = self.plugin.manager.get_verses(bible, string, False, showError)
  File "/usr/lib/python3.6/site-packages/openlp/plugins/bibles/lib/manager.py", line 273, in get_verses
    return self.db_cache[bible].get_verses(ref_list, show_error)
  File "/usr/lib/python3.6/site-packages/openlp/plugins/bibles/lib/http.py", line 701, in get_verses
    return BibleDB.get_verses(self, reference_list, show_error)
  File "/usr/lib/python3.6/site-packages/openlp/plugins/bibles/lib/db.py", line 387, in get_verses
    end_verse = self.get_verse_count(book_id, chapter)
  File "/usr/lib/python3.6/site-packages/openlp/plugins/bibles/lib/http.py", line 741, in get_verse_count
    return BiblesResourcesDB.get_verse_count(book_id, chapter)
  File "/usr/lib/python3.6/site-packages/openlp/plugins/bibles/lib/db.py", line 671, in get_verse_count
    details = BiblesResourcesDB.get_chapter(book_ref_id, chapter)
  File "/usr/lib/python3.6/site-packages/openlp/plugins/bibles/lib/db.py", line 638, in get_chapter
    'chapter, verse_count FROM chapters WHERE book_reference_id = ?', (book_ref_id,))
  File "/usr/lib/python3.6/site-packages/openlp/plugins/bibles/lib/db.py", line 528, in run_sql
    cursor.execute(query, parameters)
sqlite3.ProgrammingError: SQLite objects created in a thread can only be used in that same thread.The object was created in thread id 140286039147840 and this is thread id 140283320706816
----------------------------------------


I'm not sure if this should be fixed in 2.4 and released or just in
trunk...

While trying to replicate this in trunk I found a couple of other issues
that I opened. I'll try to see if I can fix them...

** Affects: openlp
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of OpenLP
Core, which is subscribed to OpenLP.
https://bugs.launchpad.net/bugs/1748722

Title:
  Unable to query for bibles through the remote

Status in OpenLP:
  New

Bug description:
  Using OpenLP 2.4.6 the remote is currently unable to query bibles.

  It seems to be a threading issue, here is a trace I encountered:

  ----------------------------------------
  Exception happened during processing of request from ('127.0.0.1', 36114)
  Traceback (most recent call last):
    File "/usr/lib/python3.6/socketserver.py", line 639, in process_request_thread
      self.finish_request(request, client_address)
    File "/usr/lib/python3.6/socketserver.py", line 361, in finish_request
      self.RequestHandlerClass(request, client_address, self)
    File "/usr/lib/python3.6/socketserver.py", line 696, in __init__
      self.handle()
    File "/usr/lib/python3.6/http/server.py", line 418, in handle
      self.handle_one_request()
    File "/usr/lib/python3.6/http/server.py", line 406, in handle_one_request
      method()
    File "/usr/lib/python3.6/site-packages/openlp/plugins/remotes/lib/httpserver.py", line 64, in do_GET
      self.do_post_processor()
    File "/usr/lib/python3.6/site-packages/openlp/plugins/remotes/lib/httprouter.py", line 200, in do_post_processor
      self.call_function(function, *args)
    File "/usr/lib/python3.6/site-packages/openlp/plugins/remotes/lib/httprouter.py", line 209, in call_function
      response = function['function'](*args)
    File "/usr/lib/python3.6/site-packages/openlp/plugins/remotes/lib/httprouter.py", line 660, in search
      results = plugin.media_item.search(text, False)
    File "/usr/lib/python3.6/site-packages/openlp/plugins/bibles/lib/mediaitem.py", line 964, in search
      search_results = self.plugin.manager.get_verses(bible, string, False, showError)
    File "/usr/lib/python3.6/site-packages/openlp/plugins/bibles/lib/manager.py", line 273, in get_verses
      return self.db_cache[bible].get_verses(ref_list, show_error)
    File "/usr/lib/python3.6/site-packages/openlp/plugins/bibles/lib/http.py", line 701, in get_verses
      return BibleDB.get_verses(self, reference_list, show_error)
    File "/usr/lib/python3.6/site-packages/openlp/plugins/bibles/lib/db.py", line 387, in get_verses
      end_verse = self.get_verse_count(book_id, chapter)
    File "/usr/lib/python3.6/site-packages/openlp/plugins/bibles/lib/http.py", line 741, in get_verse_count
      return BiblesResourcesDB.get_verse_count(book_id, chapter)
    File "/usr/lib/python3.6/site-packages/openlp/plugins/bibles/lib/db.py", line 671, in get_verse_count
      details = BiblesResourcesDB.get_chapter(book_ref_id, chapter)
    File "/usr/lib/python3.6/site-packages/openlp/plugins/bibles/lib/db.py", line 638, in get_chapter
      'chapter, verse_count FROM chapters WHERE book_reference_id = ?', (book_ref_id,))
    File "/usr/lib/python3.6/site-packages/openlp/plugins/bibles/lib/db.py", line 528, in run_sql
      cursor.execute(query, parameters)
  sqlite3.ProgrammingError: SQLite objects created in a thread can only be used in that same thread.The object was created in thread id 140286039147840 and this is thread id 140283320706816
  ----------------------------------------


  I'm not sure if this should be fixed in 2.4 and released or just in
  trunk...

  While trying to replicate this in trunk I found a couple of other
  issues that I opened. I'll try to see if I can fix them...

To manage notifications about this bug go to:
https://bugs.launchpad.net/openlp/+bug/1748722/+subscriptions


Follow ups