name connect is not defined (terms.to_pattern method)

Hi, I am new to prodigy and learning to use the tool.
I want to do text classification and created a dataset with seeds terms. This dataset named pricing_seeds is in prodigy database and can be read with prodigy print-dataset method.
Yet I am unable to use the terms.to_pattern method due to the below error.
In addition I am unable to see the dataset using this snippet

from prodigy.components.db import connect
db = connect()
all_dataset_names = db.datasets

I do not understand the problem.
Any help would be much appreciated !

@Prodigy_Spacy> prodigy pricing_seeds ./pricing_seeds.jsonl --label PRICING --spacy-model en_core_web_lg
Traceback (most recent call last):
  File "C:\Users\lveys\anaconda3\lib\", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\lveys\anaconda3\lib\", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\lveys\.virtualenvs\_Prodigy_Spacy-fzgAanM1\lib\site-packages\prodigy\", line 61, in <module>
    controller = recipe(*args, use_plac=True)
  File "cython_src\prodigy\core.pyx", line 426, in prodigy.core.recipe.recipe_decorator.recipe_proxy
  File "C:\Users\lveys\.virtualenvs\_Prodigy_Spacy-fzgAanM1\lib\site-packages\", line 367, in call
    cmd, result = parser.consume(arglist)
  File "C:\Users\lveys\.virtualenvs\_Prodigy_Spacy-fzgAanM1\lib\site-packages\", line 232, in consume
    return cmd, self.func(*(args + varargs + extraopts), **kwargs)
  File "C:\Users\lveys\.virtualenvs\_Prodigy_Spacy-fzgAanM1\lib\site-packages\prodigy\recipes\", line 174, in to_patterns
    DB = connect()
NameError: name 'connect' is not defined

Mhm. That's indeed a strange error. Let's check a few things then.

Could you share your Prodigy version and your Python version? The best what to share this is via:

python --version
python -m pip freeze

One thing; it's possible that this might be a virtualenv issue. Could you ensure that your Prodigy script runs via:

python -m prodigy pricing_seeds ./pricing_seeds.jsonl --label PRICING --spacy-model en_core_web_lg