Sorry, I was trying to post quickly yesterday, and guessed wrong on a few things. Here’s the correct form, which I’ve tested:
from com.inductiveautomation.ignition.common.sqltags.model.types import TagType, DataType, AccessRightsType
system.tag.addTag("MyServer OPC DA", "Test Tag4", TagType.OPC, DataType.Int4, AccessRightsType.Read_Write, True, None, None)
In Jython, null = None. You’re passing it a string that happens to have the value ‘null’, which is why it can’t coerce.
Now, that said, I think it’s probably going to be easier if you wait until the module is updated to support keyword invocation, because if you’re trying to create OPC tags, you’ll need to pass in parameters for the tag properties needed, such as opc server, and opc item path, and right now that’s going to be really annoying to create. I’ll see if we can get it updated today or tomorrow.
Regards,