# prodigy.serve with customized recipe not work for Windows machine

**URL:** <https://support.prodi.gy/t/prodigy-serve-with-customized-recipe-not-work-for-windows-machine/4194>\
**Category:** Uncategorized\
**Tags:** usage, solved, windows\
**Created:** [May 1, 2021, 2:45am UTC](https://support.prodi.gy/t/prodigy-serve-with-customized-recipe-not-work-for-windows-machine/4194 "2021-05-01T02:45:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![hz\_liberty](https://avatars.discourse-cdn.com/v4/letter/h/2bfe46/32.png) [@hz\_liberty](https://support.prodi.gy/u/hz_liberty)\
**Post date:** [May 1, 2021, 2:45am UTC](https://support.prodi.gy/t/prodigy-serve-with-customized-recipe-not-work-for-windows-machine/4194/1 "2021-05-01T02:45:14Z")

</div>

I am trying to set up ner labeling work in both Mac and Windows machines with customized recipe. The set up worked well for Mac. However, it cannot work for Windows machine with the same code. After debugging, it appeals that the issue was in prodigy.serve function when it passed source path to ner\_manual. the raw sources path was "c:\Users\source\_path\_of\_a\_jsonl\_file\_to\_be\_label". However, when it passed to ner\_manual function the all slashes were removed for some reason, the source value became "c:Userssource\_path\_of\_a\_jsonl\_file\_to\_be\_label". As a result, the run cannot be completed. Can anyone provide some insights on how to address this issue?

---

<div class="post-metadata">

**Author:** ![SofieVL](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/sofievl/32/915_2.png) [@SofieVL](https://support.prodi.gy/u/SofieVL)\
**Post date:** [May 1, 2021, 12:50pm UTC](https://support.prodi.gy/t/prodigy-serve-with-customized-recipe-not-work-for-windows-machine/4194/2 "2021-05-01T12:50:46Z")

</div>

Hi!

To fully understand what is going on, it would be good to see some example code. If I understand you correctly, your custom code passes a path to the `source` argument of `ner_manual`. On Mac, the string version of this path will have forward slashes, but on Windows it's constructed with backward slashes, which doesn't work with `ner_manual`, right?

One thing you could do in your code, is make sure the path is always in "posix" format, i.e. with forward slashes:

```python
from pathlib import Path
path = Path("my_dir_location")
path_str = path.as_posix()

```

and then continue using `path_str`.

Does that work for you?

---

<div class="post-metadata">

**Author:** ![hz\_liberty](https://avatars.discourse-cdn.com/v4/letter/h/2bfe46/32.png) [@hz\_liberty](https://support.prodi.gy/u/hz_liberty)\
**Post date:** [May 1, 2021, 1:35pm UTC](https://support.prodi.gy/t/prodigy-serve-with-customized-recipe-not-work-for-windows-machine/4194/3 "2021-05-01T13:35:43Z")

</div>

Yes, it works! Thank you so much! I was using os.path.join() and thinking that would have handled the cross-system variation, but it turned out not adequate. After adding path.as\_posix(), it worked perfectly!

---

<div class="post-metadata">

**Author:** ![SofieVL](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/sofievl/32/915_2.png) [@SofieVL](https://support.prodi.gy/u/SofieVL)\
**Post date:** [May 1, 2021, 1:38pm UTC](https://support.prodi.gy/t/prodigy-serve-with-customized-recipe-not-work-for-windows-machine/4194/4 "2021-05-01T13:38:23Z")

</div>

Happy to hear it! Yes we're a pretty big fan of `pathlib` ourselves, because it really helps with cross-platform compatibilities 🙂
