MySQL: ‘NoneType’ object has no attribute ‘Binary’

I am installing prodigy on top of an ubuntu box.

I installed spacy and downloaded multilang.
now i am trying to run a simple dataset command using “prodigy dataset my_test_set”
and get the following:

Traceback (most recent call last):
File “/usr/lib/python3.6/”, line 193, in _run_module_as_main
main”, mod_spec)
File “/usr/lib/python3.6/”, line 85, in _run_code
exec(code, run_globals)
File “/home/omri/.local/lib/python3.6/site-packages/prodigy/”, line 372, in[command], arglist=args, eager=False)
File “/home/omri/.local/lib/python3.6/site-packages/”, line 328, in call
cmd, result = parser.consume(arglist)
File “/home/omri/.local/lib/python3.6/site-packages/”, line 207, in consume
return cmd, self.func(*(args + varargs + extraopts), **kwargs)
File “/home/omri/.local/lib/python3.6/site-packages/prodigy/”, line 45, in dataset
DB = connect()
File “/home/omri/.local/lib/python3.6/site-packages/prodigy/components/”, line 75, in connect
_DB = Database(db, db_id, db_name)
File “/home/omri/.local/lib/python3.6/site-packages/prodigy/components/”, line 152, in init
File “/home/omri/.local/lib/python3.6/site-packages/”, line 431, in initialize
File “/home/omri/.local/lib/python3.6/site-packages/”, line 1197, in _set_constructor
self._constructor = database.get_binary_type()
File “/home/omri/.local/lib/python3.6/site-packages/”, line 4377, in get_binary_type
return mysql.Binary
AttributeError: ‘NoneType’ object has no attribute ‘Binary’

can you tell what id the issue?

Hi! The error seems to occur when peewee fails to connect to the database. It looks like you’ve set up Prodigy to use MySQL, but you might not have a driver installed, and/or the database isn’t configured correctly? See this thread for details:

1 Like

thank you,

so i installed a driver using:
python3 -m pip install PyMySQL

it works like a charm.