error running prodigy on MacOs

Hi, just did a fresh install of prodigy 1.11.8 on MacOs 12.3

when I run prodigy statsI get the following output:

Traceback (most recent call last):
  File "/Users/beskow/miniconda3/envs/prodigy38/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/Users/beskow/miniconda3/envs/prodigy38/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/Users/beskow/miniconda3/envs/prodigy38/lib/python3.8/site-packages/prodigy/__main__.py", line 61, in <module>
    controller = recipe(*args, use_plac=True)
  File "cython_src/prodigy/core.pyx", line 364, in prodigy.core.recipe.recipe_decorator.recipe_proxy
  File "/Users/beskow/miniconda3/envs/prodigy38/lib/python3.8/site-packages/plac_core.py", line 367, in call
    cmd, result = parser.consume(arglist)
  File "/Users/beskow/miniconda3/envs/prodigy38/lib/python3.8/site-packages/plac_core.py", line 232, in consume
    return cmd, self.func(*(args + varargs + extraopts), **kwargs)
  File "/Users/beskow/miniconda3/envs/prodigy38/lib/python3.8/site-packages/prodigy/recipes/commands.py", line 36, in stats
    DB = connect()
  File "/Users/beskow/miniconda3/envs/prodigy38/lib/python3.8/site-packages/prodigy/components/db.py", line 87, in connect
    _DB = Database(db, db_id, db_name)
  File "/Users/beskow/miniconda3/envs/prodigy38/lib/python3.8/site-packages/prodigy/components/db.py", line 196, in __init__
    DB_PROXY.initialize(db)
  File "/Users/beskow/miniconda3/envs/prodigy38/lib/python3.8/site-packages/peewee.py", line 429, in initialize
    callback(obj)
  File "/Users/beskow/miniconda3/envs/prodigy38/lib/python3.8/site-packages/peewee.py", line 4870, in _db_hook
    self._constructor = database.get_binary_type()
  File "/Users/beskow/miniconda3/envs/prodigy38/lib/python3.8/site-packages/peewee.py", line 3800, in get_binary_type
    return sqlite3.Binary
AttributeError: 'NoneType' object has no attribute 'Binary'

I installed prodigy in a new conda environment with python=3.8 using the command
pip install prodigy-1.11.8-cp38-cp38-macosx_10_15_x86_64.whl

thanks for helping out!

Jonas

Hi @beskow!

Thanks for your question and welcome to the Prodigy community :wave:

I found this similar issue where the issue looked like the issue was sqlite3 needed to be compiled.

Can you run this from the terminal like this:

sqlite3

If it doesn't work, then we've confirmed the issue is with sqlite3, not Prodigy.

sqlite3 comes by default with Mac's so this is a bit odd. I found a little bit of other info on StackExchange but you may need to search a little to reinstall/compile sqlite3 as I'm not an expert on it.

If you use brew, like this post suggests maybe just run either brew install sqlite3 or brew upgrade sqlite3.

Let me know if this helps or if you're able to get things working (and if so, how you resolved it so you can help others if they have this issue).

Hi Ryan,
thanks. sqlite3 seems to work fine (as is I get no error messages when I start it). I also ran a brew upgrade sqlite3 - and it still works fine, but the reported problem with prodigy is unchanged, unfortunately... I also tried both python3.8 and 3.9, same story...
Not really sure what else to try
jonas

Hi Jonas.

Let's check a few other things while we're at it. Are you able to run this command without error?

python -m prodigy db-out <name-of-dataset>

Note that I'm calling python -m prodigy instead of prodigy. That's somewhat safer from a venv perspective.

Could you also run:

python -m pip freeze | grep sqlite3