'NoneType' object has no attribute 'print

Hello,
i create a button with this script:
table = event.source.parent.getComponent(‘Table’).print()
but when try this button compare this message:
.
Traceback (most recent call last):
File “event:actionPerformed”, line 1, in
AttributeError: ‘NoneType’ object has no attribute ‘print’

Ignition v8.1.3 (b2021030309)
Where is the problem?
For other button create same function for file .csv, this is the script:
table = event.source.parent.getComponent(‘Table’).exportCSV(“data.csv”, 1)
and have same problem:

Traceback (most recent call last):
File “event:actionPerformed”, line 1, in
AttributeError: ‘NoneType’ object has no attribute ‘exportCSV’

Ignition v8.1.3 (b2021030309)

Thank you for help

It sounds like you don’t have a component named 'Table' anywhere in your window. Either that, or the .parent chain going back to it is incorrect. Use the property selector to select the table component to ensure you get the right path.

2 Likes

Where is the property selector?