opcua-client-gui
opcua-client-gui copied to clipboard
AttributeError: module 'asyncua.ua' has no attribute 'Bit'
Hi, when i click on connect it provide me this error, server is running correctly, can someone identify this issue.
@dataclass class AccessRights:
'''
AccessRights structure autogenerated from xml
'''
Value:ua.ByteString = b''
ValidBits:ua.ByteString = b''
@dataclass class StructureWithOptionalFields:
'''
StructureWithOptionalFields structure autogenerated from xml
'''
OptionalInt32Specified:ua.Bit = ua.Bit()
OptionalStringArraySpecified:ua.Bit = ua.Bit()
Reserved1:ua.Bit = ua.Bit()
MandatoryInt32:ua.Int32 = 0
OptionalInt32:ua.Int32 = 0
MandatoryStringArray:List[ua.CharArray] = field(default_factory=list)
OptionalStringArray:List[ua.CharArray] = field(default_factory=list)
asyncua.common.structures - ERROR - Failed to execute auto-generated code from UA datatype:
@dataclass class StructureWithOptionalFields:
'''
StructureWithOptionalFields structure autogenerated from xml
'''
OptionalInt32Specified:ua.Bit = ua.Bit()
OptionalStringArraySpecified:ua.Bit = ua.Bit()
Reserved1:ua.Bit = ua.Bit()
MandatoryInt32:ua.Int32 = 0
OptionalInt32:ua.Int32 = 0
MandatoryStringArray:List[ua.CharArray] = field(default_factory=list)
OptionalStringArray:List[ua.CharArray] = field(default_factory=list)
')
Traceback (most recent call last):
File "C:\Python39\lib\site-packages\asyncua\common\structures.py", line 281, in _generate_python_class
exec(code, env)
File "
File "
Hi, i have the same error, any solution here ?
Hi, I'll join you two, since I also have the same error when connecting to the server opc.tcp://opcuaserver.com:48010/
I pushed a fix to master so the uis does not crash. If your server does not support 1.04 you will be missing some custom types but it work