Shared script function are not found after publishing both project and global

Hi everyone,

Whenever we publish the Project and Global, some of the shared script being called on a project script are not found. This is the error :

‘com.inductiveautomation.ignition.common.script.Scr’ object has no attribute ‘api’

The work around is to just publish Project Only and the Shared Scripts will be found again.

I found this topic with the similar problem, there are only workarounds.

Is there a long term solution for this? Because some of our apps will just stop working if we publish both Project and Global.

Thank you.

Do you mean it works at first, but when you publish “Project + Global” even without changing a script, it stops working? That would be something new I think.

The issues I know about are caused by not cascading the updates: say module A uses module B, which in turn uses module C. When you then update module C, calling a function on module A will still call the call the old implementation on module C. So the update didn’t cascade through to everything that calls it.

That’s something very annoying, and I moved on to create my own external python library (see ). I just develop the library in a separate IDE (eclipse + pydev in my case), and wrote a script to copy the files I want to the pylib directory. Do note that also in this case you need to update all files at once, as the updates won’t cascade if you only update one.

Once it’s developed, you can also manually copy-paste everything to Ignition for the final installation, but so far it’s working great as an external library. I also have some other goodies now, like unit tests and version control. The main drawback of this approach is that the script can’t be seen in Ignition, and you need access to the server itself (ssh, file share, remote desktop, …) to alter the script.

What version are you using? I thought we had fixed this issue a while ago. :\

Hi Sanderd17,

Yes I meant publishing Project and Global without changing a script, it would stop working. So my workaround is publishing again without changing a script but this time only the Project.

That is interesting, we also have third party libraries on the pylib folder but have not encounter any issue yet.

My case might just be a little different, because I am not messing with pylib or other modules, it is just solely on Shared and Project scripts.

Hello, we are using 7.8.5

Thanks. I’ll investigate and see if there was a regression. :flushed:

1 Like

Did some research and found that this was a bug that’s been fixed in 7.9. The most recent build (7.9.3) should clear your problem right up! Nice find, and thank you for bringing this to our attention :slight_smile:

Thank @acooper! We will try 7.9 and keep this thread posted.

1 Like