# AttributeError("'NoneType' object has no attribute 'getChild'",)

**URL:** <https://forum.inductiveautomation.com/t/attributeerror-nonetype-object-has-no-attribute-getchild/106933>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [June 3, 2025, 6:23am UTC](https://forum.inductiveautomation.com/t/attributeerror-nonetype-object-has-no-attribute-getchild/106933 "2025-06-03T06:23:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![oliver.bernhard](https://avatars.discourse-cdn.com/v4/letter/o/e95f7d/32.png) [@oliver.bernhard](https://forum.inductiveautomation.com/u/oliver.bernhard)\
**Post date:** [June 3, 2025, 6:23am UTC](https://forum.inductiveautomation.com/t/attributeerror-nonetype-object-has-no-attribute-getchild/106933/1 "2025-06-03T06:23:17Z")

</div>

Hello everyone,

I’m currently experiencing an unexplained issue with an **Edit Change Script** on the Parameter **PassedOnOrderID**.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/0/205fa317d7a05a31db3fc0763c13a95de4dc102c.png)

Whenever a value is being passed on to the **PassedOnOrderID** Parameter the following Script is executed:

```python
# Retrieve the passed ID or order number
passedOnID = self.params.PassedOnOrderID 
system.perspective.print('passedOnID is: ' + str(passedOnID))

# Get a reference to the table component
table = self.getChild("root").getChild("fc_Offline_Programmieraufträge").getChild("Table_Orders") # Adjust path to table
system.perspective.print('Table is: ' + str(table))

# Retrieve the data of the table
tableData = table.props.data # Data must be fully loaded
system.perspective.print('tableData is: ' + str(tableData))

# Find the row index that corresponds to the passed ID or order number
rowIndex = next((index for index, row in enumerate(tableData) if str(row["ID"]) == str(passedOnID)), None)
system.perspective.print('rowIndex is: ' + str(rowIndex))

# If a valid row index is found, open the subview
if rowIndex is not None:
    table.expandSubviews([rowIndex]) # Open the subview of the corresponding row
else:
    system.perspective.print("No row index found matching the passed OrderID.")

```

This script has been working successfully across multiple projects. However, for some reason, an issue arises when trying to assign the table component to the variable **table**. I consistently encounter the following error:

```python
AttributeError("'NoneType' object has no attribute 'getChild'",)

```

Interestingly, this works without any problems:

```python
table = self.getChild("root").getChild("fc_Offline_Programmieraufträge")

```

But as soon as I try to directly reference the table, like this:

```python
table = self.getChild("root").getChild("fc_Offline_Programmieraufträge").getChild("Table_Orders")

```

I get the error.

What I’ve checked so far:

**Table Path** : The path seems correct since the parent node is found without issues. I’ve also verified that the table exists in the Designer and is correctly named.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/2/d224816831eacbd0f2f763dcd03f593b224a3ead.png)

Does anyone have any idea what could be causing this or how I can debug the issue further?

Thanks in advance for your help!

---

<div class="post-metadata">

**Author:** ![Ryan\_Deardorff](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan_deardorff/32/63815_2.png) [@Ryan\_Deardorff](https://forum.inductiveautomation.com/u/Ryan_Deardorff)\
**Post date:** [June 3, 2025, 1:54pm UTC](https://forum.inductiveautomation.com/t/attributeerror-nonetype-object-has-no-attribute-getchild/106933/2 "2025-06-03T13:54:04Z")

</div>

Have you tried renaming the component to not contain an umlaut? That shouldn't matter, but it's the only "unusual" thing I can see there...

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [June 3, 2025, 2:45pm UTC](https://forum.inductiveautomation.com/t/attributeerror-nonetype-object-has-no-attribute-getchild/106933/3 "2025-06-03T14:45:53Z")

</div>

> [@oliver.bernhard](#):
>
> Interestingly, this works without any problems:
> 
> `table = self.getChild("root").getChild("fc_Offline_Programmieraufträge")`

This isn't actually doing anything - `table` could be assigned null/None here and you wouldn't know until you try to _de_reference it.

Try this:  
`table = self.getChild("root").getChild(u"fc_Offline_Programmieraufträge").getChild("Table_Orders")`

In Python 2, you need to declare (via the `u` prefix for unicode) that you're writing out a constant string that may contain non-ASCII characters, such as the accented a.

---

<div class="post-metadata">

**Author:** ![oliver.bernhard](https://avatars.discourse-cdn.com/v4/letter/o/e95f7d/32.png) [@oliver.bernhard](https://forum.inductiveautomation.com/u/oliver.bernhard)\
**Post date:** [June 4, 2025, 6:30am UTC](https://forum.inductiveautomation.com/t/attributeerror-nonetype-object-has-no-attribute-getchild/106933/4 "2025-06-04T06:30:25Z")

</div>

What I actually wanted to say with this code snippet:

```python
table = self.getChild("root").getChild("fc_Offline_Programmieraufträge")

```

is that the error `AttributeError("'NoneType' object has no attribute 'getChild'",)` no longer occurs. However, as soon as I append .getChild("Table\_Orders"), the error is thrown. Unfortunately, I didn't make that clear, apologies for the confusion.

As a matter of fact, replacing the 'Umlaut' (ä, ü, ö) worked wonders!  
Thanks, guys—this community, as always, proves to be incredibly helpful!

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [June 4, 2025, 11:41am UTC](https://forum.inductiveautomation.com/t/attributeerror-nonetype-object-has-no-attribute-getchild/106933/5 "2025-06-04T11:41:08Z")

</div>

> [@oliver.bernhard](#):
>
> as soon as I append .getChild("Table\_Orders")

Right, you are still somewhat confused as to the real error. When you get an error that a `NoneType` is missing an attribute, it means a **prior** operation yielded a `None` that you weren't expecting. In this case, the

```python
.getChild("fc_Offline_Programmieraufträge")

```

**That** yielded a `None` instead of the expected component object, because your accented character was mangled by jython's standard string constant interpretation. Adding the `u""` syntax to the string constant fixes the mangling. Or renaming so you don't need a unicode string to avoid the problem.
