# Issue creating scripting subpackages

**URL:** <https://forum.inductiveautomation.com/t/issue-creating-scripting-subpackages/43039>\
**Category:** Ignition\
**Tags:** scripting, ignition80\
**Created:** [February 4, 2021, 8:53pm UTC](https://forum.inductiveautomation.com/t/issue-creating-scripting-subpackages/43039 "2021-02-04T20:53:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cesrom](https://avatars.discourse-cdn.com/v4/letter/c/ea666f/32.png) [@cesrom](https://forum.inductiveautomation.com/u/cesrom)\
**Post date:** [February 4, 2021, 8:53pm UTC](https://forum.inductiveautomation.com/t/issue-creating-scripting-subpackages/43039/1 "2021-02-04T20:53:26Z")

</div>

## Background

I have created one inheritable project, let’s call it `company`, and a project that inherits from `company`, let’s call it `site`.

So the projects look like this:

| Name | Inheritable | Inheritance Hierarchy |
| --- | --- | --- |
| site | false | site \> company |
| company | true | |

The `company` project has a package called `company` under **Scripting \> Project Library** , and a script or module called `module` that has some functions that are common across sites within the company.

The intention here is that every site could extend `company.module` if/when needed.

## The scenario

When I was refactoring `company` so it would only include functions shared across sites I was already using `company` on multiple sites, and each had some specific functions.

So the easiest way was to create a subpackage called `company` under each site’s Script Library, like this:

```auto
Scripting
└─ Project Library
    └ site
        └ company
            | module
    └ company
        | module

```

This way I could replace all `import` statements from:

```python
from company import module

```

To:

```python
from site import module

```

And in `site.company.module` I would import `company.module`.

## Motivation

I have created a Project meant to be used across multiple sites within the company, and every site should be able to extend modules from the parent project.

## The issue

Creating a package within a child project with the same name as a package from a parent project was possible in version 8. But since 8.0.14 this is broken.

Versions \<= 8.0.13 do allow the creation of a package called `company` under `Scripting > Project Library > site`, but since 8.0.14 the **New Package** dialog prevents this; the **Create Package** button is disabled, and there is a red icon next to the text box that displays **Invalid name** when one hovers over it.

## The quick fix

The workaround would be to go to `$IGNITION_DIR/data/projects/site/ignition/scripting-python/site` and create a folder called `company`. And when the Designer is opened, there is a subpackage called `company` under `site`. Only then one would be able to create the script called `module` under `site.company`.

## The permanent solution

Please work on Request 3974 opened since July 24, 2020.

Thanks.

---

<div class="post-metadata">

**Author:** ![cesrom](https://avatars.discourse-cdn.com/v4/letter/c/ea666f/32.png) [@cesrom](https://forum.inductiveautomation.com/u/cesrom)\
**Post date:** [February 12, 2021, 6:53pm UTC](https://forum.inductiveautomation.com/t/issue-creating-scripting-subpackages/43039/2 "2021-02-12T18:53:51Z")

</div>

When should I expect this to be fixed?

Thanks.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [February 12, 2021, 7:06pm UTC](https://forum.inductiveautomation.com/t/issue-creating-scripting-subpackages/43039/3 "2021-02-12T19:06:30Z")

</div>

It’s in progress. A PR was submitted a week ago but it’s been going back and forth with QA since then.

---

<div class="post-metadata">

**Author:** ![cesrom](https://avatars.discourse-cdn.com/v4/letter/c/ea666f/32.png) [@cesrom](https://forum.inductiveautomation.com/u/cesrom)\
**Post date:** [February 12, 2021, 9:25pm UTC](https://forum.inductiveautomation.com/t/issue-creating-scripting-subpackages/43039/4 "2021-02-12T21:25:59Z")

</div>

Thanks, @Kevin.Herron.
