# Run script in shared library gives object not callable

**URL:** <https://forum.inductiveautomation.com/t/run-script-in-shared-library-gives-object-not-callable/9866>\
**Category:** Ignition\
**Created:** [April 1, 2015, 4:31pm UTC](https://forum.inductiveautomation.com/t/run-script-in-shared-library-gives-object-not-callable/9866 "2015-04-01T16:31:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gratliff](https://avatars.discourse-cdn.com/v4/letter/g/a5b964/32.png) [@Gratliff](https://forum.inductiveautomation.com/u/Gratliff)\
**Post date:** [April 1, 2015, 4:31pm UTC](https://forum.inductiveautomation.com/t/run-script-in-shared-library-gives-object-not-callable/9866/1 "2015-04-01T16:31:53Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![nmudge](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nmudge/32/3394_2.png) [@nmudge](https://forum.inductiveautomation.com/u/nmudge)\
**Post date:** [April 1, 2015, 6:05pm UTC](https://forum.inductiveautomation.com/t/run-script-in-shared-library-gives-object-not-callable/9866/2 "2015-04-01T18:05:50Z")

</div>

Hello,

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”)

Best,

---

<div class="post-metadata">

**Author:** ![Gratliff](https://avatars.discourse-cdn.com/v4/letter/g/a5b964/32.png) [@Gratliff](https://forum.inductiveautomation.com/u/Gratliff)\
**Post date:** [April 1, 2015, 7:27pm UTC](https://forum.inductiveautomation.com/t/run-script-in-shared-library-gives-object-not-callable/9866/3 "2015-04-01T19:27:42Z")

</div>

That was it! An obvious oversight. Thanks! ![:prayer:](https://us1.discourse-cdn.com/inductiveautomation/original/1X/e5a7e3b63facc151ea73e3b45db7bdb3d4bdc316.gif ":prayer:")
