Hello!
I am trying to switch from the default sqlite to mysql remote db, but I am keep getting strange error.
The command:
python3 -m prodigy ner.teach my_set en_core_web_sm around-the-world.txt --label GPE
The error:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/runpy.py", line 183, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/runpy.py", line 142, in _get_module_details
return _get_module_details(pkg_main_name, error)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/runpy.py", line 109, in _get_module_details
__import__(pkg_name)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/prodigy/__init__.py", line 4, in <module>
from . import recipes, about # noqa
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/prodigy/recipes/__init__.py", line 4, in <module>
from . import ner, textcat, compare, terms, generic # noqa
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/prodigy/recipes/ner.py", line 25, in <module>
DB = connect()
File "cython_src/prodigy/components/db.pyx", line 31, in prodigy.components.db.connect
File "cython_src/prodigy/components/db.pyx", line 89, in prodigy.components.db.Database.__init__
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/peewee.py", line 431, in initialize
callback(obj)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/peewee.py", line 1197, in _set_constructor
self._constructor = database.get_binary_type()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/peewee.py", line 4377, in get_binary_type
return mysql.Binary
AttributeError: 'NoneType' object has no attribute 'Binary'
prodigy.json file:
{
"db": "mysql",
"db_settings": {
"mysql": {
"host" :"host",
"user" :"user",
"passwd":"password",
"db": "myawasomedb"
}
}
}
Appreciate any help!