system.net.openURL()

I am running this as in the example:

system.net.openURL(“https://www.google.com”)

It seems to work on 8.0.12, and 8.1.7 in non-containerized Ignition. However, when I run it in 8.1.5 in containerized Maker , I get the below error. Any ideas? Thanks

com.inductiveautomation.ignition.common.script.JythonExecException: Traceback (most recent call last): File “”, line 6, in runAction AttributeError: ‘com.inductiveautomation.ignition.common.script.Imm’ object has no attribute ‘openURL’

at org.python.core.Py.AttributeError(Py.java:207)
at org.python.core.PyObject.noAttributeError(PyObject.java:1032)
at org.python.core.PyObject.getattr(PyObject.java:1027)
at org.python.pycode.pyx2705.runAction$1(:8)
at org.python.pycode.pyx2705.call_function()
at org.python.core.PyTableCode.call(PyTableCode.java:171)
at org.python.core.PyBaseCode.call(PyBaseCode.java:308)
at org.python.core.PyFunction.function___call
(PyFunction.java:471)
at org.python.core.PyFunction.call(PyFunction.java:466)
at org.python.core.PyFunction.call(PyFunction.java:461)
at com.inductiveautomation.ignition.common.script.ScriptManager.runFunction(ScriptManager.java:842)
at com.inductiveautomation.ignition.common.script.ScriptManager.runFunction(ScriptManager.java:824)
at com.inductiveautomation.ignition.gateway.project.ProjectScriptLifecycle$TrackingProjectScriptManager.runFunction(ProjectScriptLifecycle.java:687)
at com.inductiveautomation.ignition.common.script.ScriptManager$ScriptFunctionImpl.invoke(ScriptManager.java:993)
at com.inductiveautomation.ignition.gateway.project.ProjectScriptLifecycle$AutoRecompilingScriptFunction.invoke(ProjectScriptLifecycle.java:752)
at com.inductiveautomation.perspective.gateway.script.ScriptFunctionHelper.invoke(ScriptFunctionHelper.java:133)
at com.inductiveautomation.perspective.gateway.action.ScriptAction.runAction(ScriptAction.java:71)
at com.inductiveautomation.perspective.gateway.action.ActionDecorator.runAction(ActionDecorator.java:18)
at com.inductiveautomation.perspective.gateway.action.SecuredAction.runAction(SecuredAction.java:44)
at com.inductiveautomation.perspective.gateway.model.ActionCollection$ActionSequence$ExecuteActionsTask.lambda$call$0(ActionCollection.java:263)
at com.inductiveautomation.perspective.gateway.api.LoggingContext.mdc(LoggingContext.java:54)
at com.inductiveautomation.perspective.gateway.model.ActionCollection$ActionSequence$ExecuteActionsTask.call(ActionCollection.java:252)
at com.inductiveautomation.perspective.gateway.model.ActionCollection$ActionSequence$ExecuteActionsTask.call(ActionCollection.java:221)
at com.inductiveautomation.perspective.gateway.threading.BlockingTaskQueue$TaskWrapper.run(BlockingTaskQueue.java:154)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.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: Traceback (most recent call last): File “”, line 6, in runAction AttributeError: ‘com.inductiveautomation.ignition.common.script.Imm’ object has no attribute ‘openURL’
… 29 common frames omitted

openURL, despite being in the system.net namespace, is a Vision module only function.
In Perspective (and therefore in Maker) you’ll want to use system.perspective.navigate.

oops, ok, I see it:

  • Scope

    Vision Client

Someday I will get used to this Perspective vs Vision thing… Thanks!

1 Like

We’re planning to introduce a new system.vision namespace to collect all these scattered functions into in 8.2 - old calls will keep working, but it’ll make discovery a lot easier.

1 Like

@PGriffith I was trying to use openURL to redirect the user to a draft email with the address and subject already filled in. From the script terminal it worked but not in perspective or designer preview…then I found this post.

However, system.perspective.navigate won’t work for what I am trying. Is there any other option in the system library?

systemName = system.tag.read("[System]Gateway/SystemName").value

system.perspective.navigate("mailto:example@com?subject={} Ignition Feedback&body=".format(systemName))

Thanks,

Nick

I think with Perspective you’ll have to settle for the Link component and set that as the URL.