# prodigy.serve does not work with custom recipe

**URL:** <https://support.prodi.gy/t/prodigy-serve-does-not-work-with-custom-recipe/2379>\
**Category:** Uncategorized\
**Tags:** usage, api\
**Created:** [December 29, 2019, 3:19am UTC](https://support.prodi.gy/t/prodigy-serve-does-not-work-with-custom-recipe/2379 "2019-12-29T03:19:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![praveer](https://avatars.discourse-cdn.com/v4/letter/p/41988e/32.png) [@praveer](https://support.prodi.gy/u/praveer)\
**Post date:** [December 29, 2019, 3:19am UTC](https://support.prodi.gy/t/prodigy-serve-does-not-work-with-custom-recipe/2379/1 "2019-12-29T03:19:04Z")

</div>

I am trying to run a custom recipe from prodigy.serve but it works fine on command line but does not work when triggered from python

---

<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 29, 2019, 12:42pm UTC](https://support.prodi.gy/t/prodigy-serve-does-not-work-with-custom-recipe/2379/2 "2019-12-29T12:42:21Z")

</div>

How are you running the command? Since `prodigy.serve` is already executed from Python, it shouldn't need to point to _another_ file containing the recipe script. That's only needed on the command line using the `-F` flag.

If you're already within a Python script, you should be able to just include the recipe script _before_ the call to `prodigy.serve` (either in the same file, or imported from a module – however you like to structure your code). The `@recipe` decorator registers the recipe with Prodigy, and when you call `prodigy.serve` with the name, Prodigy should be able to find it.
