Hi. I'm trying to work with an OPC-UA server. On the OPC Browser I have the following configuration:
Then, I'm running the following code on a onStartup event:
def runAction(self):
output = system.opcua.callMethod(
"OPC_Pedidos",
"nsu=intercambio_pedidos_SCADA;i=1",
"nsu=intercambio_pedidos_SCADA;i=25",
[]
)
lista_param = output[2]
Where the following error appears:
Error running action 'system.onStartup' on Popups/popup_estado_actual@D: Traceback (most recent call last): File "function:runAction", line 4, in runAction java.lang.ClassCastException: class org.eclipse.milo.opcua.sdk.client.nodes.UaVariableNode cannot be cast to class org.eclipse.milo.opcua.sdk.client.model.nodes.variables.PropertyTypeNode (org.eclipse.milo.opcua.sdk.client.nodes.UaVariableNode and org.eclipse.milo.opcua.sdk.client.model.nodes.variables.PropertyTypeNode are in unnamed module of loader com.inductiveautomation.ignition.gateway.modules.ModuleClassLoader @603dec95) at org.eclipse.milo.opcua.sdk.client.nodes.UaNode.lambda$null$15(UaNode.java:1064) at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(Unknown Source) at java.base/java.util.concurrent.CompletableFuture.postComplete(Unknown Source) at java.base/java.util.concurrent.CompletableFuture.complete(Unknown Source) at org.eclipse.milo.opcua.stack.client.UaStackClient.lambda$deliverResponse$5(UaStackClient.java:318) at org.eclipse.milo.opcua.stack.core.util.ExecutionQueue$Task.run(ExecutionQueue.java:119) 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) java.lang.ClassCastException: java.lang.ClassCastException: class org.eclipse.milo.opcua.sdk.client.nodes.UaVariableNode cannot be cast to class org.eclipse.milo.opcua.sdk.client.model.nodes.variables.PropertyTypeNode (org.eclipse.milo.opcua.sdk.client.nodes.UaVariableNode and org.eclipse.milo.opcua.sdk.client.model.nodes.variables.PropertyTypeNode are in unnamed module of loader com.inductiveautomation.ignition.gateway.modules.ModuleClassLoader @603dec95)
I know that the nodeId of the method and object are correct since prior to this I did a browse using system.opc.browse. The results were:
Any hints on why could this error be happening? Thanks in advance.