8.3.1 System.tag.getConfiguration() not behaving the same as 8.1

Previously in 8.1 the system.tag.getConfiguration() would return a config object that could then be used to make edits to a tag and then reconfigure it using system.tag.configure() with that config object.

tp = "[default]Test/New Tag"
config = system.tag.getConfiguration(tp, True)

system.tag.configure("[default]Test", config, 'o')

In 8.1 this gives a [Good] result.

However in 8.3.1 this gives the following error.

[Error_Configuration("java.lang.ClassCastException: class com.inductiveautomation.ignition.common.config.BasicDescriptiveProperty cannot be cast to class java.lang.String (com.inductiveautomation.ignition.common.config.BasicDescriptiveProperty is in unnamed module of loader java.net.URLClassLoader @5528b3ac; java.lang.String is in module java.base of loader 'bootstrap')")]

Looked into this a bit more and it seems that previously in 8.1 a tag object returned like below.

dataType(<type 'unicode'>) : String
path(<type 'unicode'>) : [default]Test/New Tag
tagType(<type 'unicode'>) : AtomicTag
name(<type 'unicode'>) : New Tag
valueSource(<type 'unicode'>) : memory
value(<type 'unicode'>) : Test Value

While 8.3.1 returns that object as below where the defaultValue and value key are no longer a unicode type as before and is what seems to cause the java.lang.ClassCastException seen when trying to use that config object in the system.tag.configure() function.

dataType(<type 'unicode'>) : String
defaultValue(<type 'com.inductiveautomation.ignition.common.config.BasicDescriptiveProperty'>) : 
path(<type 'unicode'>) : [default]Test/New Tag
tagType(<type 'unicode'>) : AtomicTag
name(<type 'unicode'>) : New Tag
valueSource(<type 'unicode'>) : memory
value(<type 'com.inductiveautomation.ignition.common.config.BasicDescriptiveProperty'>) : Test Value

Does anybody know if this is intended behavior of how this will work going forward? I assume I will need recreate these objects with string type keys for the system.tag.configure() to accept it properly.

This is a bug that's fixed in 8.3.2, which should be released within a couple of weeks.

Thanks for the quick feedback on this!

1 Like

Hey paul ,

I am confused ,
this script is not running properly in 8.3.1 nor 8.3.2

showing tag null after using system.tag.configure(folderPath, tag, 'o')

def runAction(self, event):
	folderPath = self.view.params.savedTagsPath
	system.perspective.print ("folderPath="+ self.view.params.savedTagsPath)
	if not system.tag.exists(folderPath):
		system.perspective.print ("not system.tag.exists(folderPath)")
		DynamicReporting.create_folders()
	listName = self.getSibling("TF_ListName").props.text
	system.perspective.print (listName)
	if listName == '':
		system.perspective.print ("listName == ''")
		tagFilter = {'name':'List_*'}
		results = system.tag.browse(folderPath, tagFilter)
		if results.getReturnedSize() > 0:
			results = results.getResults()
			a = results[len(results)-1]
			a = str(a['name'])
			listNumber = a.split('_')[1]
			listName = 'List_' + str(int(listNumber)+1)
		else:
			listName = 'List_1'
	
	if system.tag.exists(folderPath):
		tag = {
		'name':listName,
		'tagType' :'memory',
		'enabled' : True,
		'valueSource':'memory',
		'dataType' : 'DataSet',
		'value' : self.view.params.SelectedTags
		}
		system.perspective.print (tag)
		system.tag.configure(folderPath, tag, 'o')
		system.perspective.print ("configure processed now")		
		list = system.tag.browse(folderPath + '/')
		system.perspective.print ("list")		
		system.perspective.print (list)
		names = []
		header = ['List']
		for i in range(len(list)):		
			a =	list[i]['name']	
			names.append([a])	
		self.getSibling("Table_SavedList").props.data = system.dataset.toDataSet(header,names)
		system.perspective.print ("final")
		system.perspective.print (system.dataset.toDataSet(header,names))

8.3.2 hasn't yet been released; are you testing with the release candidate(s)? Which one?

I tested my original issue with 8.3.2 - RC2 and the issues I was seeing were resolved. Was able to use system.tag.getConfiguration() and system.tag.configure() as expected without getting any errors. Going to assume their issue my be outside of the system.tag.configuration() bug that was in 8.3.1.

1 Like