if tag_check_neagtive:
negative_message = 'This chart is unavailable for string type data. Please unselect the tags listed below from the Tag Tree Browser.'
negative_message += '<br/>'.join([r'\[{}\]{}'.format(tag.source,tag.toStringPartial()) for tag in tag_check_neagtive])
system.perspective.openPopup("Warning", "test",
{"message": negative_message}, "Error",
modal=True, showCloseIcon=True, draggable=False, resizable=False)
com.inductiveautomation.ignition.common.script.JythonExecException
Traceback (most recent call last):
File "<function:onMessageReceived>", line 87, in onMessageReceived
AttributeError: 'unicode' object has no attribute 'source'
caused by org.python.core.PyException
Traceback (most recent call last):
File "<function:onMessageReceived>", line 87, in onMessageReceived
AttributeError: 'unicode' object has no attribute 'source'
Okay, so the list, is really a list of strings, not TagPath objects.
if tag_check_neagtive:
negative_message = 'This chart is unavailable for string type data. Please unselect the tags listed below from the Tag Tree Browser.'
negative_message += '<br/>'.join([r'\[{}\]{}'.format(tag[1:tag.find(']')],tag[tag.find(']') + 1:]) for tag in tag_check_neagtive])
system.perspective.openPopup("Warning", "test",
{"message": negative_message}, "Error",
modal=True, showCloseIcon=True, draggable=False, resizable=False)