Timer Script: 'com.inductiveautomation.ignition.common.script.Imm' object has no attribute 'ws'

I can´t open projects from gateway on client computer.

Any idea what this error on the gateway is related to and how to fix it.

Error in Timer Script: 'com.inductiveautomation.ignition.common.script.Imm' object has no attribute 'ws'

ExecutionException: com.inductiveautomation.ignition.client.gateway_interface.GatewayException: Connection reset
caused by GatewayException: Connection reset
caused by SocketException: Connection reset

Any ideas welcome.

We are going to need to see the script to help.

2 Likes
TimerScriptTask	29Jan2026 12:46:36	Error executing global timer script: Copy_Of_Version-12_5-01-08-25/MAX_DNF_KW @300.000ms . Repeat errors of this type will be logged as 'debug' messages.
com.inductiveautomation.ignition.common.script.JythonExecException: Traceback (most recent call last): File "", line 6, in File "", line 61, in comprobarGuardado TypeError: str indices must be integers

at org.python.core.Py.TypeError(Py.java:234)

at org.python.core.SequenceIndexDelegate.checkIdxAndFindItem(SequenceIndexDelegate.java:74)

at org.python.core.SequenceIndexDelegate.checkIdxAndGetItem(SequenceIndexDelegate.java:61)

at org.python.core.PySequence.seq___getitem__(PySequence.java:378)

at org.python.core.PySequence.__getitem__(PySequence.java:374)

at org.python.pycode._pyx105.comprobarGuardado$3(:164)

at org.python.pycode._pyx105.call_function()

at org.python.core.PyTableCode.call(PyTableCode.java:173)

at org.python.core.PyBaseCode.call(PyBaseCode.java:134)

at org.python.core.PyFunction.__call__(PyFunction.java:416)

at org.python.pycode._pyx104.f$0(:37)

at org.python.pycode._pyx104.call_function()

at org.python.core.PyTableCode.call(PyTableCode.java:173)

at org.python.core.PyCode.call(PyCode.java:18)

at org.python.core.Py.runCode(Py.java:1703)

at com.inductiveautomation.ignition.common.script.ScriptManager.runCode(ScriptManager.java:804)

at com.inductiveautomation.ignition.gateway.project.ProjectScriptLifecycle$TrackingProjectScriptManager.runCode(ProjectScriptLifecycle.java:859)

at com.inductiveautomation.ignition.common.script.ScriptManager.runCode(ScriptManager.java:752)

at com.inductiveautomation.ignition.gateway.project.ProjectScriptLifecycle$TrackingProjectScriptManager.runCode(ProjectScriptLifecycle.java:840)

at com.inductiveautomation.ignition.common.script.TimerScriptTask.run(TimerScriptTask.java:92)

at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)

at java.base/java.util.concurrent.FutureTask.runAndReset(Unknown Source)

at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)

at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

at java.base/java.lang.Thread.run(Unknown Source)

Caused by: org.python.core.PyException: TypeError: str indices must be integers


That is the stack trace, can you provide the actual timer script referenced?

java.io.IOException: End of stream reached.

at com.inductiveautomation.iosession.socket.AsyncSocketIOSession.run(AsyncSocketIOSession.java:74)

the last piece of code I was running:

try:
    tbl = self.getSibling("tblWorkRequest")
    selectedData = tbl.props.selection.data

    if selectedData and len(selectedData) > 0:
        row = selectedData[0]

        solicitud = row.get('SOLICITUD', None)
        if solicitud in (None, ''):
            raise Exception("La fila seleccionada no contiene el campo 'SOLICITUD'.")


        company_raw = self.parent.custom.company


        if company_raw is None:
            raise Exception("No hay company definida en self.parent.custom.company.")

        if isinstance(company_raw, basestring):
            # Permite "ORANGE", "TIENDAS", "ORANGE,TIENDAS", "ORANGE | TIENDAS", etc.
            cleaned = company_raw.replace("|", ",").replace(";", ",")
            parts = [p.strip().upper() for p in cleaned.split(",") if p.strip()]
            company_list = list(set(parts))
        else:
            # Si ya viene como lista/array (por ejemplo ["ORANGE","TIENDAS"])
            company_list = [str(x).strip().upper() for x in company_raw if str(x).strip()]



        if len(company_list) == 0:
            raise Exception("self.parent.custom.company está vacío.")
        elif len(company_list) == 1:
            company = company_list[0]
        else:
            company = "BOTH"

        ta = self.getSibling("TextArea")
        ta.props.text = (ta.props.text or "") + u"\nPreparando aprobación para solicitud {}...".format(solicitud)

        system.perspective.openPopup(
            id="popup-confirmacion",
            view="Page/Confirmacion",
            params={
                "workRequest": solicitud,
                "company": company,
                "estado": "10",
                "modo": "aprobacion",
                "titulo": "Aprobar Solicitud",
                "mensaje": u"¿Deseas aprobar esta solicitud y generar una orden de trabajo?",
                "infoadicional": ""
            },
            title="Aprobar Solicitud",
            modal=True,
            width=500,
            height=400
        )
    else:
        system.perspective.openPopup(
            id="noneSelected-popup",
            view="Page/NoneSelected",
            title="Sin selección",
            modal=True,
            width=300,
            height=200
        )

except Exception:
    import sys, traceback
    error = "".join(traceback.format_exception(*sys.exc_info()))
    ta = self.getSibling("TextArea")
    ta.props.text = (ta.props.text or "") + "\nError inesperado:\n" + error

if I restart the gateway may fix it

No running scripts right now, I just restarted the gateway

Is that the entire script file?

Specifically lets start with this timer script:

Copy_Of_Version-12_5-01-08-25/MAX_DNF_KW
2 Likes

Would it help if I use bacck-up of gateway before I got the error ?

I don't know. I have not seen the script.

We aren't magicians, and that error is pointing to a specific error in your script. If you can't provide the script that is causing issues so we can help you decipher what is going on, all you are doing it guessing at the issue and not fixing it.

EDIT
What is the actual problem you are trying to solve? You started with an error in a timer script, and then you provided what seems to be script from a perspective view. They might be related, but what are you trying to fix?

2 Likes

Now i cant open projects on my Ignition client, so I guess just doing backup of the gateway will go to previous point so I could open at least older projects.

One way to get this error, is the following:

path = "[your]tag/path"
config = system.tag.getConfiguration(path)
print config['name']

getConfiguration returns a list, so you must read the first item through config[0].

I however cannot verify this, because i can’t see what line 67 is in your code. Please share that piece of code, or start looking there.

1 Like

This pretty much means nothing to an end user, it's just part of the stack trace. The important part of a stack trace are the lines that start with Caused by: In this case you have a timer script running which is called Copy_Of_Version-12_5-01-08-25/MAX_DNF_KW. In that timer script on line 6 you are calling a function comprobarGuardado. In that file on line 61 you are trying to access a list element with a string which can not be converted to an integer.

This code does not match the stack trace you provided. We know this because the stack trace calls out a Gateway Timer script, but the code you provided uses self.getSibling() which is not available in a Gateway Timer script.

The error you proivided in your OP also doesn't match the stack trace you provided. That error looks like you may be having network issues, in which case I would not expect a backup to correct the issue.

3 Likes

Yes, exact that, was a network issue, I just was able to open the project.

Thanks everyone for your answers @bschroeder @JVDM and @lrose

image

I didnt need to do any backups and can keep working fluently without any issues.