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

**URL:** <https://support.prodi.gy/t/mysql-nonetype-object-has-no-attribute-binary/1766>\
**Category:** Uncategorized\
**Tags:** install, database, linux\
**Created:** [July 10, 2019, 8:23am UTC](https://support.prodi.gy/t/mysql-nonetype-object-has-no-attribute-binary/1766 "2019-07-10T08:23:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![omrison](https://avatars.discourse-cdn.com/v4/letter/o/b5a626/32.png) [@omrison](https://support.prodi.gy/u/omrison)\
**Post date:** [July 10, 2019, 8:23am UTC](https://support.prodi.gy/t/mysql-nonetype-object-has-no-attribute-binary/1766/1 "2019-07-10T08:23:24Z")

</div>

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/runpy.py”, line 193, in \_run\_module\_as\_main  
“ **main** ”, mod\_spec)  
File “/usr/lib/python3.6/runpy.py”, line 85, in \_run\_code  
exec(code, run\_globals)  
File “/home/omri/.local/lib/python3.6/site-packages/prodigy/ **main**.py”, line 372, in   
plac.call(commands[command], arglist=args, eager=False)  
File “/home/omri/.local/lib/python3.6/site-packages/plac\_core.py”, line 328, in call  
cmd, result = parser.consume(arglist)  
File “/home/omri/.local/lib/python3.6/site-packages/plac\_core.py”, line 207, in consume  
return cmd, self.func(\*(args + varargs + extraopts), \*\*kwargs)  
File “/home/omri/.local/lib/python3.6/site-packages/prodigy/ **main**.py”, line 45, in dataset  
DB = connect()  
File “/home/omri/.local/lib/python3.6/site-packages/prodigy/components/db.py”, line 75, in connect  
\_DB = Database(db, db\_id, db\_name)  
File “/home/omri/.local/lib/python3.6/site-packages/prodigy/components/db.py”, line 152, in **init**  
DB\_PROXY.initialize(db)  
File “/home/omri/.local/lib/python3.6/site-packages/peewee.py”, line 431, in initialize  
callback(obj)  
File “/home/omri/.local/lib/python3.6/site-packages/peewee.py”, line 1197, in \_set\_constructor  
self.\_constructor = database.get\_binary\_type()  
File “/home/omri/.local/lib/python3.6/site-packages/peewee.py”, line 4377, in get\_binary\_type  
return mysql.Binary  
AttributeError: ‘NoneType’ object has no attribute ‘Binary’

can you tell what id the issue?

---

<div class="post-metadata">

**Author:** ![ines](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/ines/32/3_2.png) [@ines](https://support.prodi.gy/u/ines)\
**Post date:** [July 10, 2019, 8:37am UTC](https://support.prodi.gy/t/mysql-nonetype-object-has-no-attribute-binary/1766/2 "2019-07-10T08:37:50Z")

</div>

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:

> [@Connecting mysql db failed](https://support.prodi.gy/t/connecting-mysql-db-failed/248):
>
> 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…

---

<div class="post-metadata">

**Author:** ![omrison](https://avatars.discourse-cdn.com/v4/letter/o/b5a626/32.png) [@omrison](https://support.prodi.gy/u/omrison)\
**Post date:** [July 10, 2019, 9:27am UTC](https://support.prodi.gy/t/mysql-nonetype-object-has-no-attribute-binary/1766/3 "2019-07-10T09:27:49Z")

</div>

> [@ines](#):
>
> but you might not have a driver installed, and/or the database isn’t configured correctly? See this thread for details:

thank you,

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

it works like a charm.
