# Invalid db component in custom recipe

**URL:** <https://support.prodi.gy/t/invalid-db-component-in-custom-recipe/2337>\
**Category:** Uncategorized\
**Tags:** done, api\
**Created:** [December 19, 2019, 8:08am UTC](https://support.prodi.gy/t/invalid-db-component-in-custom-recipe/2337 "2019-12-19T08:08:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![simon.gurcke](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/simon.gurcke/32/1001_2.png) [@simon.gurcke](https://support.prodi.gy/u/simon.gurcke)\
**Post date:** [December 19, 2019, 8:08am UTC](https://support.prodi.gy/t/invalid-db-component-in-custom-recipe/2337/1 "2019-12-19T08:08:31Z")

</div>

I create a Database object as described in the documentation to use a PostgreSQL database in a custom recipe, and I pass it in as the `db` component in the returned dict. This worked fine in Prodigy 1.8.4 but in 1.9.0 I'm getting the following error:

```
✘ Invalid components returned by recipe 'clinex.textcat.teach'
db <prodigy.components.db.Database object at 0x1251ae2b0> is not callable
db value could not be parsed to a boolean

```

How do I get this to work again in the new Prodigy version?

---

<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:** [December 19, 2019, 8:28am UTC](https://support.prodi.gy/t/invalid-db-component-in-custom-recipe/2337/2 "2019-12-19T08:28:27Z")

</div>

Ah, damn, sorry about that. Looks like the new validation is _too_ strict now 🤦‍♀️ Will fix this!

The easiest workaround is to just set `"validate": False` in your `prodigy.json` or recipe config to disable validation. You could also go into `prodigy/types.py`, find the `RecipeComponents` schema and change the `db` entry to something like `db: Optional[Any] = True`.

**Edit:** Should be fixed in the latest v1.9.1 🙂
