tag.browseTags and error executing gateway function exception

I am attempting to execute the system.tag.browseTags function. My Ignition version is 7.9.7. My script is configured as a custom method on the root container of a window and is being called from an action performed script on a button. I am passing parameters to the script. Upon executing the script I am returning the following error

Traceback (most recent call last):
  File "<event:actionPerformed>", line 6, in doLater
  File "<custom-function searchForTags>", line 10, in searchForTags
	at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.newGatewayException(GatewayInterface.java:341)

	at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.sendMessage(GatewayInterface.java:315)

	at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.sendMessage(GatewayInterface.java:268)

	at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.invoke(GatewayInterface.java:894)

	at com.inductiveautomation.factorypmi.application.script.builtin.ialabs.IALabsTagFunctions.browseTagsImpl(IALabsTagFunctions.java:30)

	at com.inductiveautomation.ignition.common.script.builtin.ialabs.AbstractIALabsTagFunctions.browseTags(AbstractIALabsTagFunctions.java:31)

	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

	at java.lang.reflect.Method.invoke(Unknown Source)


com.inductiveautomation.ignition.client.gateway_interface.GatewayException: com.inductiveautomation.ignition.client.gateway_interface.GatewayException: Error executing gateway function.

	at org.python.core.Py.JavaError(Py.java:495)
	at org.python.core.Py.JavaError(Py.java:488)
	at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:188)
	at com.inductiveautomation.ignition.common.script.ScriptManager$ReflectedInstanceFunction.__call__(ScriptManager.java:429)
	at org.python.core.PyObject.__call__(PyObject.java:320)
	at org.python.pycode._pyx2.searchForTags$1(<custom-function searchForTags>:35)
	at org.python.pycode._pyx2.call_function(<custom-function searchForTags>)
	at org.python.core.PyTableCode.call(PyTableCode.java:165)
	at org.python.core.PyBaseCode.call(PyBaseCode.java:184)
	at org.python.core.PyFunction.__call__(PyFunction.java:350)
	at org.python.core.PyMethod.__call__(PyMethod.java:154)
	at org.python.pycode._pyx1.doLater$1(<event:actionPerformed>:7)
	at org.python.pycode._pyx1.call_function(<event:actionPerformed>)
	at org.python.core.PyTableCode.call(PyTableCode.java:165)
	at org.python.core.PyBaseCode.call(PyBaseCode.java:301)
	at org.python.core.PyFunction.function___call__(PyFunction.java:376)
	at org.python.core.PyFunction.__call__(PyFunction.java:371)
	at org.python.core.PyFunction.__call__(PyFunction.java:361)
	at org.python.core.PyFunction.__call__(PyFunction.java:356)
	at com.inductiveautomation.ignition.common.script.ScriptManager.runFunction(ScriptManager.java:647)
	at com.inductiveautomation.factorypmi.application.script.builtin.ClientSystemUtilities$2.run(ClientSystemUtilities.java:361)
	at java.awt.event.InvocationEvent.dispatch(Unknown Source)
	at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.awt.EventQueue.access$500(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: com.inductiveautomation.ignition.client.gateway_interface.GatewayException: Error executing gateway function.
	at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.newGatewayException(GatewayInterface.java:341)
	at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.sendMessage(GatewayInterface.java:315)
	at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.sendMessage(GatewayInterface.java:268)
	at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.invoke(GatewayInterface.java:894)
	at com.inductiveautomation.factorypmi.application.script.builtin.ialabs.IALabsTagFunctions.browseTagsImpl(IALabsTagFunctions.java:30)
	at com.inductiveautomation.ignition.common.script.builtin.ialabs.AbstractIALabsTagFunctions.browseTags(AbstractIALabsTagFunctions.java:31)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:186)
	... 32 more
Caused by: com.inductiveautomation.ignition.common.exceptions.DefaultNotDefinedException
	at com.inductiveautomation.ignition.gateway.project.ProjectSettingsCache$ProjectDefaultTagManagerFacade.wrap(ProjectSettingsCache.java:436)
	at com.inductiveautomation.ignition.gateway.project.ProjectSettingsCache$ProjectDefaultTagManagerFacade.getTagProvider(ProjectSettingsCache.java:713)
	at com.inductiveautomation.ignition.gateway.servlets.gateway.functions.SQLTags.getDefaultProvider(SQLTags.java:847)
	at com.inductiveautomation.ignition.gateway.servlets.gateway.functions.IALabs.browseTags(IALabs.java:138)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.inductiveautomation.ignition.gateway.servlets.gateway.AbstractGatewayFunction.invoke(AbstractGatewayFunction.java:208)
	at com.inductiveautomation.ignition.gateway.servlets.Gateway.doPost(Gateway.java:405)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at com.inductiveautomation.ignition.gateway.bootstrap.MapServlet.service(MapServlet.java:85)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:837)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:583)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1160)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1092)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:52)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
	at org.eclipse.jetty.server.Server.handle(Server.java:518)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:308)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:244)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
	at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceAndRun(ExecuteProduceConsume.java:246)
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:156)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:654)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:572)
	at java.lang.Thread.run(Thread.java:745)

Ignition v7.9.7 (b2018032914)
Java: Oracle Corporation 1.8.0_161

I have even called browseTag from the script playground and returned the same error. Any assistance would be greatly appreciated.

Did you specify that tag provider? Can you post your script?

I cannot share the script. What I tried to execute from the script playground was

system.tag.browseTags(parentPath="[My_Provider]", tagPath="*", recursive=True)

For what its worth, this does execute fine from other gateways.

Specify a default tag provider for the project you’re running this from.

Thanks Paul, that was exactly what the issue was.