# DataSets StackOverFlow

**URL:** <https://forum.inductiveautomation.com/t/datasets-stackoverflow/41645>\
**Category:** Ignition\
**Created:** [December 18, 2020, 2:04pm UTC](https://forum.inductiveautomation.com/t/datasets-stackoverflow/41645 "2020-12-18T14:04:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![downerczx](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/downerczx/32/11649_2.png) [@downerczx](https://forum.inductiveautomation.com/u/downerczx)\
**Post date:** [December 18, 2020, 2:04pm UTC](https://forum.inductiveautomation.com/t/datasets-stackoverflow/41645/1 "2020-12-18T14:04:17Z")

</div>

I’m trying to use system.tag.exportTags to export some datasets. At first, these datasets were very large, but I made my script batch them into as small as 50 rows/2 columns each containing strings, which should be light enough to handle. I am using system.tag.exportTags to export them to a file, but on the 2nd iteration, I get a StackOverflowError. I get this if I just try to export some datasets from the tag browser. Shouldn’t it be able to handle ~100 strings in an export?

UPDATE: I can’t even export a dataset with 5 rows, 2 columns.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/e/2e07e162fac112684798d487e2dd61e81ef60608.png)

```auto
IOException: com.inductiveautomation.ignition.client.gateway_interface.GatewayException: Error executing gateway function.
	caused by GatewayException: Error executing gateway function.
	caused by StackOverflowError

Original Error Message:
Ignition v8.1.0 (b2020110211)
Java: Azul Systems, Inc. 11.0.7

Jython 2.7.1 (default:0df7adb1b397, Jun 30 2017, 19:02:43) 
[OpenJDK 64-Bit Server VM (Azul Systems, Inc.)] on java11.0.7

Datasets generated
writing Analog Setpoint datasets to: [162Edge]/Setpoints/162AnalogSetpoints1
Writing tag to: C:\SetpointBackups\162AnalogSetpoints1
Datasets generated
writing Alarm Setpoint datasets to: [162Edge]/Setpoints/162AlarmSetpoints1
Writing tag to: C:\SetpointBackups\162AlarmSetpoints1
Java Traceback:
Traceback (most recent call last):
  File "<input>", line 148, in <module>
  File "<input>", line 125, in BackupSetpointsFull
  File "<input>", line 59, in browseTags
  File "<input>", line 59, in browseTags
  File "<input>", line 59, in browseTags
  File "<input>", line 59, in browseTags
  File "<input>", line 120, in browseTags
  File "<input>", line 34, in writeToDataSet
	at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.newGatewayException(GatewayInterface.java:359)

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

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

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

	at com.inductiveautomation.ignition.client.script.ClientTagUtilities.exportInternal(ClientTagUtilities.java:297)

	at com.inductiveautomation.ignition.common.script.builtin.AbstractTagUtilities.exportTags(AbstractTagUtilities.java:440)

	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

	at java.base/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:552)

	at org.python.core.Py.JavaError(Py.java:543)

	at org.python.core.PyReflectedFunction. __call__ (PyReflectedFunction.java:190)

	at com.inductiveautomation.ignition.common.script.ScriptManager$ReflectedInstanceFunction. __call__ (ScriptManager.java:523)

	at org.python.core.PyObject. __call__ (PyObject.java:515)

	at org.python.core.PyObject. __call__ (PyObject.java:519)

	at org.python.pycode._pyx57.writeToDataSet$1(<input>:34)

	at org.python.pycode._pyx57.call_function(<input>)

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

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

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

	at org.python.pycode._pyx57.browseTags$3(<input>:63)

	at org.python.pycode._pyx57.call_function(<input>)

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

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

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

	at org.python.pycode._pyx57.browseTags$3(<input>:63)

	at org.python.pycode._pyx57.call_function(<input>)

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

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

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

	at org.python.pycode._pyx57.browseTags$3(<input>:63)

	at org.python.pycode._pyx57.call_function(<input>)

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

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

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

	at org.python.pycode._pyx57.browseTags$3(<input>:63)

	at org.python.pycode._pyx57.call_function(<input>)

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

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

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

	at org.python.pycode._pyx57.browseTags$3(<input>:63)

	at org.python.pycode._pyx57.call_function(<input>)

	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.pycode._pyx57.BackupSetpointsFull$2(<input>:146)

	at org.python.pycode._pyx57.call_function(<input>)

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

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

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

	at org.python.pycode._pyx57.f$0(<input>:148)

	at org.python.pycode._pyx57.call_function(<input>)

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

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

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

	at org.python.core.Py.exec(Py.java:1658)

	at org.python.util.PythonInterpreter.exec(PythonInterpreter.java:276)

	at org.python.util.InteractiveInterpreter.runcode(InteractiveInterpreter.java:131)

	at com.inductiveautomation.ignition.designer.gui.tools.jythonconsole.JythonConsole$ConsoleWorker.doInBackground(JythonConsole.java:605)

	at com.inductiveautomation.ignition.designer.gui.tools.jythonconsole.JythonConsole$ConsoleWorker.doInBackground(JythonConsole.java:593)

	at java.desktop/javax.swing.SwingWorker$1.call(Unknown Source)

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

	at java.desktop/javax.swing.SwingWorker.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: com.inductiveautomation.ignition.client.gateway_interface.GatewayException: Error executing gateway function.

	at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.newGatewayException(GatewayInterface.java:359)

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

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

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

	at com.inductiveautomation.ignition.client.script.ClientTagUtilities.exportInternal(ClientTagUtilities.java:297)

	at com.inductiveautomation.ignition.common.script.builtin.AbstractTagUtilities.exportTags(AbstractTagUtilities.java:440)

	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

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

	at org.python.core.PyReflectedFunction. __call__ (PyReflectedFunction.java:188)

	... 55 more

Caused by: java.lang.StackOverflowError

	at java.lang.Class.privateGetPublicMethods(null)

	at java.lang.Class.getMethods(null)

	at org.json.JSONObject.populateMap(JSONObject.java:846)

	at org.json.JSONObject.<init>(JSONObject.java:259)

	at org.json.JSONObject.wrap(JSONObject.java:1460)

	at org.json.JSONObject.populateMap(JSONObject.java:873)

	at org.json.JSONObject.<init>(JSONObject.java:259)

	at org.json.JSONObject.wrap(JSONObject.java:1460)

	at org.json.JSONObject.populateMap(JSONObject.java:873)

	at org.json.JSONObject.<init>(JSONObject.java:259)

	at org.json.JSONObject.wrap(JSONObject.java:1460)

	at org.json.JSONObject.populateMap(JSONObject.java:873)

	at org.json.JSONObject.<init>(JSONObject.java:259)

	at org.json.JSONObject.wrap(JSONObject.java:1460)

	at org.json.JSONObject.populateMap(JSONObject.java:873)

	at org.json.JSONObject.<init>(JSONObject.java:259)

........

	at org.json.JSONObject.populateMap(JSONObject.java:873)

	at org.json.JSONObject.<init>(JSONObject.java:259)

Traceback (most recent call last):
  File "<input>", line 148, in <module>
  File "<input>", line 125, in BackupSetpointsFull
  File "<input>", line 59, in browseTags
  File "<input>", line 59, in browseTags
  File "<input>", line 59, in browseTags
  File "<input>", line 59, in browseTags
  File "<input>", line 120, in browseTags
  File "<input>", line 34, in writeToDataSet
	at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.newGatewayException(GatewayInterface.java:359)

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

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

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

	at com.inductiveautomation.ignition.client.script.ClientTagUtilities.exportInternal(ClientTagUtilities.java:297)

	at com.inductiveautomation.ignition.common.script.builtin.AbstractTagUtilities.exportTags(AbstractTagUtilities.java:440)

	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

	at java.base/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.

```

---

<div class="post-metadata">

**Author:** ![downerczx](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/downerczx/32/11649_2.png) [@downerczx](https://forum.inductiveautomation.com/u/downerczx)\
**Post date:** [December 18, 2020, 3:07pm UTC](https://forum.inductiveautomation.com/t/datasets-stackoverflow/41645/2 "2020-12-18T15:07:22Z")

</div>

Solved by Joe @ tech support. They aren’t two strings. One column is a PyDataSet. Must cast this to string. PyDataSet unsupported for XML export.
