# Error saving the container?

**URL:** <https://forum.inductiveautomation.com/t/error-saving-the-container/67844>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [December 20, 2022, 6:49pm UTC](https://forum.inductiveautomation.com/t/error-saving-the-container/67844 "2022-12-20T18:49:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![L\_F](https://avatars.discourse-cdn.com/v4/letter/l/5f8ce5/32.png) [@L\_F](https://forum.inductiveautomation.com/u/L_F)\
**Post date:** [December 20, 2022, 6:49pm UTC](https://forum.inductiveautomation.com/t/error-saving-the-container/67844/1 "2022-12-20T18:49:29Z")

</div>

I have a window with a template repeater and custom variable of type dataset which gets a dataset to which the repeater is bound. The window display looks the way I want and is working as expected, but whenever I save the project I get the following: "Error saving container."

```auto
SerializationException: Error during serialization for property 'interactionController' on object '[FPMIWindow]Rack Groups'
	caused by SerializationException: Error during serialization for property 'propertyAdapters' on object '[DefaultInteractionController]com.inductiveautomation.factorypmi.application.binding.DefaultInteractionController@3d093d89'
	caused by SerializationException: Error during serialization for property 'component' on object '[PropertyKey]Template Canvas.templates'
	caused by SerializationException: Error during serialization for property 'templates' on object '[TemplateCanvas]com.inductiveautomation.factorypmi.application.components.TemplateCanvas[Template Canvas,20,15,290x625,layout=com.inductiveautomation.ignition.client.util.gui.FillingLayout,alignmentX=0.0,alignmentY=0.0,border=,flags=9,maximumSize=,minimumSize=,preferredSize=]'
	caused by TypeError: unhashable type: 'dict'

Ignition v8.1.22 (b2022110109)
Java: Azul Systems, Inc. 11.0.16.1

```

A type error I can understand, but I don't understand why it's being generated from the components within my window. Logs attached.

[wrapper.log](https://forum.inductiveautomation.com/uploads/short-url/kJ0B2CobWHZxUVxq2YfcfRcXhuj.log) (3.3 MB)

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [December 20, 2022, 7:06pm UTC](https://forum.inductiveautomation.com/t/error-saving-the-container/67844/2 "2022-12-20T19:06:43Z")

</div>

Looks like you've constructed a dataset that has a dictionary nested within. That produces an unserializable object. Use json instead.

---

<div class="post-metadata">

**Author:** ![L\_F](https://avatars.discourse-cdn.com/v4/letter/l/5f8ce5/32.png) [@L\_F](https://forum.inductiveautomation.com/u/L_F)\
**Post date:** [December 20, 2022, 7:31pm UTC](https://forum.inductiveautomation.com/t/error-saving-the-container/67844/3 "2022-12-20T19:31:08Z")

</div>

That did it, thanks! My code looks like this:

```auto
def rackDataSetBuilder(group):
	path = '[Infrastructure Live Tags]Experiment_Racks/%s' % (group)
	racks = system.tag.browse(path)
	
	headers = ['name','template','parameters','x','y','width','height','layout','z']
	data = []
	for i in range(len(racks)):
		layout = None
		if i%3 == 0: #Make a new line every 3rd template
			layout = 'newline'
		
		parameters = '{\'rackPath\':\'%s\'}' % (str(racks[i]['fullPath']))
		data.append([i, 'Group Rack',parameters,0,0,None,None,layout,None])
	
	dataset = system.dataset.toDataSet(headers, data)
	return dataset

```

Is there an elegant way to make the `parameter` variable a json string?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [December 20, 2022, 8:45pm UTC](https://forum.inductiveautomation.com/t/error-saving-the-container/67844/4 "2022-12-20T20:45:54Z")

</div>

> [@L\_F](#):
>
> an elegant way

[system.util.jsonEncode()](https://docs.inductiveautomation.com/display/DOC81/system.util.jsonEncode)
