Re: sqlite3.OperationalError: no such module: fts5

Posted by Billy on
URL: http://owlready.306.s1.nabble.com/sqlite3-OperationalError-no-such-module-fts5-tp1103p1728.html

Hi Jiba,

I'm facing the same problem.

I'm using windows with anaconda.

I tried to update the sqlite and sqlite3 from anaconda, but do not work.

my version is like follow:

print(__import__("sqlite3").version)
2.6.0

print (__import__("sqlite3").sqlite_version)
3.31.1

print(sys.version)
3.7.6 (default, Jan  8 2020, 20:23:39) [MSC v.1916 64 bit (AMD64)]


Importing UMLS from Zip file umls-2019AB-metathesaurus.zip with Python version 3.7...
  Parsing 2019AB/META/MRRANK.RRF as MRRANK
  Parsing 2019AB/META/MRCONSO.RRF as MRCONSO
  Parsing 2019AB/META/MRDEF.RRF as MRDEF
  Parsing 2019AB/META/MRREL.RRF as MRREL
  Parsing 2019AB/META/MRSAT.RRF as MRSAT
Breaking ORIG cycles...
    SNOMEDCT_US : 0 cycles found:
    ICD10 : 0 cycles found:
    SRC : 0 cycles found:
Finalizing only properties and restrictions...
Finalizing CUI - ORIG mapping...
FTS Indexing...
---------------------------------------------------------------------------
OperationalError                          Traceback (most recent call last)
<ipython-input-7-a1e6606c43bd> in <module>
----> 1 import_umls("umls-2019AB-metathesaurus.zip", terminologies = ["ICD10", "SNOMEDCT_US", "CUI"])

D:\anaconda3\lib\site-packages\owlready2\pymedtermino2\umls.py in import_umls(umls_zip_filename, terminologies, langs, fts_index, extract_groups, extract_attributes, extract_relations, extract_definitions, remove_suppressed)
    747   if fts_index:
    748     print("FTS Indexing...")
--> 749     default_world.full_text_search_properties.append(label)
    750     default_world.full_text_search_properties.append(PYM.synonyms)
    751

D:\anaconda3\lib\site-packages\owlready2\util.py in append(self, x)
     75   def _replace(self, old, new): super().__setitem__(self.index(old), new)
     76   def reinit(self, l):          old = list(self); super().__init__(l)       ; self._callback(self._obj, old)
---> 77   def append(self, x):          old = list(self); super().append(x)         ; self._callback(self._obj, old)
     78   def insert(self, i, x):       old = list(self); super().insert(i, x)      ; self._callback(self._obj, old)
     79   def extend(self, l):          old = list(self); super().extend(l)         ; self._callback(self._obj, old)

D:\anaconda3\lib\site-packages\owlready2\namespace.py in _full_text_search_changed(self, old)
    474       self.graph.disable_full_text_search(Prop.storid)
    475     for Prop in new - old:
--> 476       self.graph.enable_full_text_search(Prop.storid)
    477
    478   def new_blank_node(self): return self.graph.new_blank_node()

D:\anaconda3\lib\site-packages\owlready2\triplelite.py in enable_full_text_search(self, prop_storid)
   1001     self.execute("""INSERT INTO prop_fts VALUES (?)""", (prop_storid,));
   1002
-> 1003     self.execute("""CREATE VIRTUAL TABLE fts_%s USING fts5(s UNINDEXED, o, d UNINDEXED, content=datas, content_rowid=rowid)""" % prop_storid)
   1004     self.execute("""INSERT INTO fts_%s(rowid, s, o, d) SELECT rowid, s, o, d FROM datas WHERE p=%s""" % (prop_storid, prop_storid))
   1005

OperationalError: no such module: fts5