# Facing Error while creating the package for model

**URL:** <https://support.prodi.gy/t/facing-error-while-creating-the-package-for-model/1658>\
**Category:** Uncategorized\
**Tags:** spacy, solved\
**Created:** [June 14, 2019, 8:54am UTC](https://support.prodi.gy/t/facing-error-while-creating-the-package-for-model/1658 "2019-06-14T08:54:08Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![aman7ronaldo](https://avatars.discourse-cdn.com/v4/letter/a/f9ae1b/32.png) [@aman7ronaldo](https://support.prodi.gy/u/aman7ronaldo)\
**Post date:** [June 14, 2019, 8:54am UTC](https://support.prodi.gy/t/facing-error-while-creating-the-package-for-model/1658/1 "2019-06-14T08:54:08Z")

</div>

Hi, I am facing a problem while creating package for the text classification model using Spacy library.

The error shown is : [WinError 206] The filename or extension is too long:  
it also mentions Shutil.Error in the beginning.

How to resolve this issue?

 ![s1](https://us1.discourse-cdn.com/flex020/uploads/prodigy/original/1X/b711c2eaefa871bfcfbf41403c6b96d6fd962e0f.png)

---

<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:** [June 14, 2019, 9:03am UTC](https://support.prodi.gy/t/facing-error-while-creating-the-package-for-model/1658/2 "2019-06-14T09:03:32Z")

</div>

What’s the command you ran and what paths did you use?

It looks like you might have accidentally created the Python package _within the same directory_ as the model you trained. When you package the model, spaCy will copy the input data (trained model) into the package directory recursively, and then add all the package-specific files. But because you’re copying it into itself, you’re basically creating an infinite loop with insanely long paths, until `shutil` gives up.

Try removing all the nested directories created by the package command and start again, using a different directory as the output 🙂

---

<div class="post-metadata">

**Author:** ![aman7ronaldo](https://avatars.discourse-cdn.com/v4/letter/a/f9ae1b/32.png) [@aman7ronaldo](https://support.prodi.gy/u/aman7ronaldo)\
**Post date:** [June 14, 2019, 9:06am UTC](https://support.prodi.gy/t/facing-error-while-creating-the-package-for-model/1658/3 "2019-06-14T09:06:43Z")

</div>

This is the command which i have used.  
python -m spacy package C:\Users\amanpresingh\Desktop\new\_prody C:\Users\amanpresingh\Desktop\final --create-meta

So , basically i must change the output directory to a completely new folder?

---

<div class="post-metadata">

**Author:** ![aman7ronaldo](https://avatars.discourse-cdn.com/v4/letter/a/f9ae1b/32.png) [@aman7ronaldo](https://support.prodi.gy/u/aman7ronaldo)\
**Post date:** [June 14, 2019, 9:12am UTC](https://support.prodi.gy/t/facing-error-while-creating-the-package-for-model/1658/4 "2019-06-14T09:12:06Z")

</div>

hey, Thank you for the response. It is working fine now. 🙂

---

<div class="post-metadata">

**Author:** ![John-davis78](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/john-davis78/32/4384_2.png) [@John-davis78](https://support.prodi.gy/u/John-davis78)\
**Post date:** [April 25, 2024, 8:33am UTC](https://support.prodi.gy/t/facing-error-while-creating-the-package-for-model/1658/5 "2024-04-25T08:33:01Z")

</div>

Hello guys, I needed reviews for the Longpath tool!

---

<div class="post-metadata">

**Author:** ![Rickeymarchram](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/rickeymarchram/32/4385_2.png) [@Rickeymarchram](https://support.prodi.gy/u/Rickeymarchram)\
**Post date:** [April 25, 2024, 4:49pm UTC](https://support.prodi.gy/t/facing-error-while-creating-the-package-for-model/1658/6 "2024-04-25T16:49:14Z")

</div>

Hey John, yes I have used LPT. It is effective for longpath files. You can google to get more information about it.

---

<div class="post-metadata">

**Author:** ![Rukhsana](https://avatars.discourse-cdn.com/v4/letter/r/7993a0/32.png) [@Rukhsana](https://support.prodi.gy/u/Rukhsana)\
**Post date:** [May 9, 2024, 6:37am UTC](https://support.prodi.gy/t/facing-error-while-creating-the-package-for-model/1658/7 "2024-05-09T06:37:19Z")

</div>

Hey I am trying to install LongPath Tool but it shows some error, can you guide me?

---

<div class="post-metadata">

**Author:** ![Rickeymarchram](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/rickeymarchram/32/4385_2.png) [@Rickeymarchram](https://support.prodi.gy/u/Rickeymarchram)\
**Post date:** [May 9, 2024, 6:38am UTC](https://support.prodi.gy/t/facing-error-while-creating-the-package-for-model/1658/8 "2024-05-09T06:38:24Z")

</div>

Can you share the screen shot? If not, please check the system details mentioned on the LPT website.

---

<div class="post-metadata">

**Author:** ![Rukhsana](https://avatars.discourse-cdn.com/v4/letter/r/7993a0/32.png) [@Rukhsana](https://support.prodi.gy/u/Rukhsana)\
**Post date:** [May 9, 2024, 6:41am UTC](https://support.prodi.gy/t/facing-error-while-creating-the-package-for-model/1658/9 "2024-05-09T06:41:10Z")

</div>

Thank you for the reply, let me check it.
