Run script in shared library gives object not callable

I am having trouble running a script (any script, even a simple test script as shown in user manual). Currently I’ve moved to testing in the script playground until I figure out what I’m doing wrong.

My script (run in the plalyground):
shared.Microblend.PrintHelloWorld(“Hello World”)

My script in the shared library shared>Microblend>PrintHelloWorld:
def PrintHelloWorld(message):
print message

Error in console:
[b]Traceback (most recent call last):

File “”, line 1, in

TypeError: ‘com.inductiveautomation.ignition.common.script.ScriptModule’ object is not callable

Ignition v7.7.2 (b2014121709)
Java: Oracle Corporation 1.8.0_11[/b]

My OS is:
Windows Server 2008 R2

I’m sure this is simple oversight. Any help would be appreciated.


It looks like you made Microblend a package and PrintHelloWorld a script module, and then you tried to call the PrintHelloWorld script module like it was a function, which doesn’t work.

If you defined the “PrintHelloWorld” function inside the “PrintHelloWorld” script module then this call will work:
shared.Microblend.PrintHelloWorld.PrintHelloWorld(“Hello World”)

You might want to delete the Microblend package and create a Microblend script module and put your PrintHelloWorld function there. Then you can call it how you are trying to call it, like this: shared.Microblend.PrintHelloWorld(“Hello World”)


1 Like

That was it! An obvious oversight. Thanks! :prayer: