fuzzymatcher
fuzzymatcher copied to clipboard
Error when running on Windows: sqlite3.OperationalError: no such module: fts4
I am on a Windows 10 machine using Anaconda with fuzzymatcher
installed from PyPI:
$ conda list | grep fuzzy
fuzzymatcher 0.0.5 pypi_0 pypi
fuzzywuzzy 0.18.0 pypi_0 pypi
When I run a Python script that uses fuzzymatcher
I get the following error:
$ python match_addresses.py -c C:/home/data/good_addresses.csv -u C:/home/data/unmatched_addresses.csv
Traceback (most recent call last):
File "match_addresses.py", line 65, in <module>
match()
File "C:\home\miniconda3\envs\canada\lib\site-packages\click\core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "C:\home\miniconda3\envs\canada\lib\site-packages\click\core.py", line 782, in main
rv = self.invoke(ctx)
File "C:\home\miniconda3\envs\canada\lib\site-packages\click\core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\home\miniconda3\envs\canada\lib\site-packages\click\core.py", line 610, in invoke
return callback(*args, **kwargs)
File "match_addresses.py", line 56, in match
matched_results = fuzzymatcher.fuzzy_left_join(unmatched_df,
File "C:\home\miniconda3\envs\canada\lib\site-packages\fuzzymatcher\__init__.py", line 41, in fuzzy_left_join
m.match_all()
File "C:\home\miniconda3\envs\canada\lib\site-packages\fuzzymatcher\matcher.py", line 89, in match_all
self.data_getter.add_data(self)
File "C:\home\miniconda3\envs\canada\lib\site-packages\fuzzymatcher\data_getter_sqlite.py", line 60, in add_data
con.execute(sql)
sqlite3.OperationalError: no such module: fts4
I have installed sqlite_fts4
but this hasn't helped.
$ conda list | grep fts4
sqlite-fts4 0.5.2 pypi_0 pypi
I've even uninstalled fuzzymatcher
and the reinstalled it fresh, thinking that maybe it finds the fts4
goodies it needs when installing but no luck, same error when I try again after doing that.
I do not have the same error when I run this code in the Windows Subsystem for Linux (Ubuntu 20.04) so I think this is a Windows-specific issue.
Thanks in advance for any suggestions on how to resolve this issue. In any event thanks to all the developers of this package, it's quite useful!
Hi!
I was using this package without any problems until I updated some packages in my environment and now I'm having this issue. I'm not sure which package blew this off. Have you figured out how to solve it?
Thanks!
Same issue on Win 10 Pro Version 10.0.19043 Build 19043 Python 3.8.8
---------------------------------------------------------------------------
OperationalError Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_17232/2011641540.py in <module>
----> 1 fuzzy_left_join(departamentos, vacunados, 'departamento', 'establecimiento')
C:\ProgramData\Anaconda3\lib\site-packages\fuzzymatcher\__init__.py in fuzzy_left_join(df_left, df_right, left_on, right_on, left_id_col, right_id_col)
39 m = Matcher(dp, dg, s)
40 m.add_data(df_left, df_right, left_on, right_on, left_id_col, right_id_col)
---> 41 m.match_all()
42
43 return m.get_left_join_table()
C:\ProgramData\Anaconda3\lib\site-packages\fuzzymatcher\matcher.py in match_all(self)
87 self.scorer.add_data(self)
88
---> 89 self.data_getter.add_data(self)
90
91 # Get a table that contains only the matches, scores and ids
C:\ProgramData\Anaconda3\lib\site-packages\fuzzymatcher\data_getter_sqlite.py in add_data(self, matcher)
58 USING fts4({} TEXT, _concat_all TEXT, _concat_all_alternatives TEXT);
59 """.format(matcher.right_id_col)
---> 60 con.execute(sql)
61 con.execute("INSERT INTO fts_target SELECT * FROM df_right_processed")
62
OperationalError: no such module: fts4
Interesting. I also have Windows 10 Pro 19043.1052. I solved the issue by uninstalling Python 9.5.6 (which I installed by mistake) and keeping Python 3.8.8. Not sure why it's not working for you.