Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: module 'asyncua.ua' has no attribute 'Integer' #87

Open
amattana opened this issue Aug 23, 2022 · 8 comments
Open

AttributeError: module 'asyncua.ua' has no attribute 'Integer' #87

amattana opened this issue Aug 23, 2022 · 8 comments

Comments

@amattana
Copy link

Just installed with pip.
Trying to connect to a Rittal PDU with OPC-UA server running.
Query server capabilities works.
Any hints?

@schroeder-
Copy link

A minimal code, stacktrace and log output would be nice to help you.

@amattana
Copy link
Author

amattana commented Aug 23, 2022

If may help...thanks!

uaclient.uaclient - INFO - Endpoint 1:')
uaclient.uaclient - INFO -   Endpoint URL: opc.tcp://192.168.30.41:4840')
uaclient.uaclient - INFO -   Application URI: urn:eth0:Rittal:CMC_III_UA_Server')
uaclient.uaclient - INFO -   Product URI: http://www.rittal.com')
uaclient.uaclient - INFO -   Application Name: LocalizedText(Locale='', Text='CMC III UA Server')')
uaclient.uaclient - INFO -   Application Type: ApplicationType.Server')
uaclient.uaclient - INFO -   Discovery URL: opc.tcp://eth0:4840')
uaclient.uaclient - INFO -   Server Certificate: domainComponent=eth0, countryName=DE, stateOrProvinceName=Hessen, localityName=Herborn, organizationName=Rittal GmbH, commonName=CMCIII (self-signed), 2022-08-23 10:50:42 - 2027-08-22 10:50:42')
uaclient.uaclient - INFO -   Security Mode: MessageSecurityMode.None_')
uaclient.uaclient - INFO -   Security Policy URI: http://opcfoundation.org/UA/SecurityPolicy#None')
uaclient.uaclient - INFO -   User policy: 0')
uaclient.uaclient - INFO -     Token type: UserTokenType.Anonymous')
uaclient.uaclient - INFO -   User policy: 1')
uaclient.uaclient - INFO -     Token type: UserTokenType.UserName')
uaclient.uaclient - INFO -     Security Policy URI: http://opcfoundation.org/UA/SecurityPolicy#Basic128Rsa15')
uaclient.uaclient - INFO -   User policy: 2')
uaclient.uaclient - INFO -     Token type: UserTokenType.Certificate')
uaclient.uaclient - INFO -     Security Policy URI: http://opcfoundation.org/UA/SecurityPolicy#Basic128Rsa15')
uaclient.uaclient - INFO -   Transport Profile URI: http://opcfoundation.org/UA-Profile/Transport/uatcp-uasc-uabinary')
uaclient.uaclient - INFO -   Security Level: 0')
uaclient.uaclient - INFO - ')
uaclient.uaclient - INFO - Endpoint 2:')
uaclient.uaclient - INFO -   Endpoint URL: opc.tcp://192.168.30.41:4840')
uaclient.uaclient - INFO -   Application URI: urn:eth0:Rittal:CMC_III_UA_Server')
uaclient.uaclient - INFO -   Product URI: http://www.rittal.com')
uaclient.uaclient - INFO -   Application Name: LocalizedText(Locale='', Text='CMC III UA Server')')
uaclient.uaclient - INFO -   Application Type: ApplicationType.Server')
uaclient.uaclient - INFO -   Discovery URL: opc.tcp://eth0:4840')
uaclient.uaclient - INFO -   Server Certificate: domainComponent=eth0, countryName=DE, stateOrProvinceName=Hessen, localityName=Herborn, organizationName=Rittal GmbH, commonName=CMCIII (self-signed), 2022-08-23 10:50:42 - 2027-08-22 10:50:42')
uaclient.uaclient - INFO -   Security Mode: MessageSecurityMode.SignAndEncrypt')
uaclient.uaclient - INFO -   Security Policy URI: http://opcfoundation.org/UA/SecurityPolicy#Basic128Rsa15')
uaclient.uaclient - INFO -   User policy: 0')
uaclient.uaclient - INFO -     Token type: UserTokenType.Anonymous')
uaclient.uaclient - INFO -   User policy: 1')
uaclient.uaclient - INFO -     Token type: UserTokenType.UserName')
uaclient.uaclient - INFO -     Security Policy URI: http://opcfoundation.org/UA/SecurityPolicy#Basic128Rsa15')
uaclient.uaclient - INFO -   User policy: 2')
uaclient.uaclient - INFO -     Token type: UserTokenType.Certificate')
uaclient.uaclient - INFO -     Security Policy URI: http://opcfoundation.org/UA/SecurityPolicy#Basic128Rsa15')
uaclient.uaclient - INFO -   Transport Profile URI: http://opcfoundation.org/UA-Profile/Transport/uatcp-uasc-uabinary')
uaclient.uaclient - INFO -   Security Level: 0')
uaclient.uaclient - INFO - ')
uaclient.uaclient - INFO - Endpoint 3:')
uaclient.uaclient - INFO -   Endpoint URL: opc.tcp://192.168.30.41:4840')
uaclient.uaclient - INFO -   Application URI: urn:eth0:Rittal:CMC_III_UA_Server')
uaclient.uaclient - INFO -   Product URI: http://www.rittal.com')
uaclient.uaclient - INFO -   Application Name: LocalizedText(Locale='', Text='CMC III UA Server')')
uaclient.uaclient - INFO -   Application Type: ApplicationType.Server')
uaclient.uaclient - INFO -   Discovery URL: opc.tcp://eth0:4840')
uaclient.uaclient - INFO -   Server Certificate: domainComponent=eth0, countryName=DE, stateOrProvinceName=Hessen, localityName=Herborn, organizationName=Rittal GmbH, commonName=CMCIII (self-signed), 2022-08-23 10:50:42 - 2027-08-22 10:50:42')
uaclient.uaclient - INFO -   Security Mode: MessageSecurityMode.SignAndEncrypt')
uaclient.uaclient - INFO -   Security Policy URI: http://opcfoundation.org/UA/SecurityPolicy#Basic256')
uaclient.uaclient - INFO -   User policy: 0')
uaclient.uaclient - INFO -     Token type: UserTokenType.Anonymous')
uaclient.uaclient - INFO -   User policy: 1')
uaclient.uaclient - INFO -     Token type: UserTokenType.UserName')
uaclient.uaclient - INFO -     Security Policy URI: http://opcfoundation.org/UA/SecurityPolicy#Basic128Rsa15')
uaclient.uaclient - INFO -   User policy: 2')
uaclient.uaclient - INFO -     Token type: UserTokenType.Certificate')
uaclient.uaclient - INFO -     Security Policy URI: http://opcfoundation.org/UA/SecurityPolicy#Basic128Rsa15')
uaclient.uaclient - INFO -   Transport Profile URI: http://opcfoundation.org/UA-Profile/Transport/uatcp-uasc-uabinary')
uaclient.uaclient - INFO -   Security Level: 0')
uaclient.uaclient - INFO - ')
uaclient.uaclient - INFO - Connecting to opc.tcp://192.168.30.41:4840 with parameters None_, None, , ')
asyncua.common.structures104 - ERROR - Failed to execute auto-generated code from UA datatype: 
UInteger = ua.Integer
')
Traceback (most recent call last):
  File "/home/aavs/Software/aavs-system/py3venv/python/lib/python3.8/site-packages/asyncua/common/structures104.py", line 394, in make_basetype_code
    exec(code, env)
  File "<string>", line 2, in <module>
AttributeError: module 'asyncua.ua' has no attribute 'Integer'
uaclient.mainwindow - WARNING - showing error: %s')
uawidgets.utils - ERROR - module 'asyncua.ua' has no attribute 'Integer'')
Traceback (most recent call last):
  File "/home/aavs/Software/aavs-system/py3venv/python/lib/python3.8/site-packages/uawidgets/utils.py", line 21, in wrapper
    result = func(self, *args)
  File "/home/aavs/Software/aavs-system/py3venv/python/lib/python3.8/site-packages/uaclient/mainwindow.py", line 354, in connect
    self.uaclient.connect(uri)
  File "/home/aavs/Software/aavs-system/py3venv/python/lib/python3.8/site-packages/uaclient/uaclient.py", line 126, in connect
    self.client.load_data_type_definitions()
  File "/home/aavs/Software/aavs-system/py3venv/python/lib/python3.8/site-packages/asyncua/sync.py", line 94, in wrapper
    result = self.tloop.post(aio_func(*args, **kwargs))
  File "/home/aavs/Software/aavs-system/py3venv/python/lib/python3.8/site-packages/asyncua/sync.py", line 52, in post
    return futur.result()
  File "/usr/lib/python3.8/concurrent/futures/_base.py", line 444, in result
    return self.__get_result()
  File "/usr/lib/python3.8/concurrent/futures/_base.py", line 389, in __get_result
    raise self._exception
  File "/home/aavs/Software/aavs-system/py3venv/python/lib/python3.8/site-packages/asyncua/client/client.py", line 698, in load_data_type_definitions
    return await load_data_type_definitions(self, node, overwrite_existing=overwrite_existing)
  File "/home/aavs/Software/aavs-system/py3venv/python/lib/python3.8/site-packages/asyncua/common/structures104.py", line 416, in load_data_type_definitions
    new_objects = await _load_base_datatypes(server)  # we need to load all basedatatypes alias first
  File "/home/aavs/Software/aavs-system/py3venv/python/lib/python3.8/site-packages/asyncua/common/structures104.py", line 407, in _load_base_datatypes
    await _recursive_parse_basedatatypes(server, server.get_node(desc.NodeId), name, new_alias)
  File "/home/aavs/Software/aavs-system/py3venv/python/lib/python3.8/site-packages/asyncua/common/structures104.py", line 379, in _recursive_parse_basedatatypes
    await _recursive_parse_basedatatypes(server, server.get_node(desc.NodeId), name, new_alias)
  File "/home/aavs/Software/aavs-system/py3venv/python/lib/python3.8/site-packages/asyncua/common/structures104.py", line 376, in _recursive_parse_basedatatypes
    env = make_basetype_code(name, parent_datatype)
  File "/home/aavs/Software/aavs-system/py3venv/python/lib/python3.8/site-packages/asyncua/common/structures104.py", line 394, in make_basetype_code
    exec(code, env)
  File "<string>", line 2, in <module>
AttributeError: module 'asyncua.ua' has no attribute 'Integer'
uaclient.mainwindow - WARNING - showing error: %s')

@schroeder-
Copy link

Ok found the problem, I will create a pr to fix the issue soon.

@amattana
Copy link
Author

Great, thanks!

@schroeder-
Copy link

Can you install this branch: FreeOpcUa/opcua-asyncio#1009 and retry?

@amattana
Copy link
Author

Got the same error, maybe I'm wrong...!?!

$ pip install git+https://github.com/schroeder-/opcua-asyncio.git
Collecting git+https://github.com/schroeder-/opcua-asyncio.git
Cloning https://github.com/schroeder-/opcua-asyncio.git to /tmp/pip-req-build-8oulfcks
Running command git clone --filter=blob:none --quiet https://github.com/schroeder-/opcua-asyncio.git /tmp/pip-req-build-8oulfcks
Resolved https://github.com/schroeder-/opcua-asyncio.git to commit c6596b0cc4a881ff16e92f2e3cf9de58c349fe3d
Preparing metadata (setup.py) ... done
Requirement already satisfied: aiofiles in ./Software/aavs-system/py3venv/python/lib/python3.8/site-packages (from asyncua==0.9.94) (0.8.0)
Requirement already satisfied: aiosqlite in ./Software/aavs-system/py3venv/python/lib/python3.8/site-packages (from asyncua==0.9.94) (0.17.0)
Requirement already satisfied: python-dateutil in ./Software/aavs-system/py3venv/python/lib/python3.8/site-packages (from asyncua==0.9.94) (2.8.2)
Requirement already satisfied: pytz in ./Software/aavs-system/py3venv/python/lib/python3.8/site-packages (from asyncua==0.9.94) (2022.1)
Requirement already satisfied: cryptography in ./Software/aavs-system/py3venv/python/lib/python3.8/site-packages (from asyncua==0.9.94) (37.0.4)
Requirement already satisfied: sortedcontainers in ./Software/aavs-system/py3venv/python/lib/python3.8/site-packages (from asyncua==0.9.94) (2.4.0)
Requirement already satisfied: typing_extensions>=3.7.2 in ./Software/aavs-system/py3venv/python/lib/python3.8/site-packages (from aiosqlite->asyncua==0.9.94) (4.1.1)
Requirement already satisfied: cffi>=1.12 in ./Software/aavs-system/py3venv/python/lib/python3.8/site-packages (from cryptography->asyncua==0.9.94) (1.15.1)
Requirement already satisfied: six>=1.5 in ./Software/aavs-system/py3venv/python/lib/python3.8/site-packages (from python-dateutil->asyncua==0.9.94) (1.16.0)
Requirement already satisfied: pycparser in ./Software/aavs-system/py3venv/python/lib/python3.8/site-packages (from cffi>=1.12->cryptography->asyncua==0.9.94) (2.21)

$ opcua-client
ADR ['opc.tcp://localhost:4840', 'opc.tcp://localhost:53530/OPCUA/SimulationServer/']
uaclient.uaclient - INFO - Endpoint 1:')
uaclient.uaclient - INFO - Endpoint URL: opc.tcp://192.168.30.41:4840')
uaclient.uaclient - INFO - Application URI: urn:eth0:Rittal:CMC_III_UA_Server')
uaclient.uaclient - INFO - Product URI: http://www.rittal.com')
uaclient.uaclient - INFO - Application Name: LocalizedText(Locale='', Text='CMC III UA Server')')
uaclient.uaclient - INFO - Application Type: ApplicationType.Server')
uaclient.uaclient - INFO - Discovery URL: opc.tcp://eth0:4840')
uaclient.uaclient - INFO - Server Certificate: domainComponent=eth0, countryName=DE, stateOrProvinceName=Hessen, localityName=Herborn, organizationName=Rittal GmbH, commonName=CMCIII (self-signed), 2022-08-23 10:50:42 - 2027-08-22 10:50:42')
uaclient.uaclient - INFO - Security Mode: MessageSecurityMode.None_')
uaclient.uaclient - INFO - Security Policy URI: http://opcfoundation.org/UA/SecurityPolicy#None')
uaclient.uaclient - INFO - User policy: 0')
uaclient.uaclient - INFO - Token type: UserTokenType.Anonymous')
uaclient.uaclient - INFO - User policy: 1')
uaclient.uaclient - INFO - Token type: UserTokenType.UserName')
uaclient.uaclient - INFO - Security Policy URI: http://opcfoundation.org/UA/SecurityPolicy#Basic128Rsa15')
uaclient.uaclient - INFO - User policy: 2')
uaclient.uaclient - INFO - Token type: UserTokenType.Certificate')
uaclient.uaclient - INFO - Security Policy URI: http://opcfoundation.org/UA/SecurityPolicy#Basic128Rsa15')
uaclient.uaclient - INFO - Transport Profile URI: http://opcfoundation.org/UA-Profile/Transport/uatcp-uasc-uabinary')
uaclient.uaclient - INFO - Security Level: 0')
uaclient.uaclient - INFO - ')
uaclient.uaclient - INFO - Endpoint 2:')
uaclient.uaclient - INFO - Endpoint URL: opc.tcp://192.168.30.41:4840')
uaclient.uaclient - INFO - Application URI: urn:eth0:Rittal:CMC_III_UA_Server')
uaclient.uaclient - INFO - Product URI: http://www.rittal.com')
uaclient.uaclient - INFO - Application Name: LocalizedText(Locale='', Text='CMC III UA Server')')
uaclient.uaclient - INFO - Application Type: ApplicationType.Server')
uaclient.uaclient - INFO - Discovery URL: opc.tcp://eth0:4840')
uaclient.uaclient - INFO - Server Certificate: domainComponent=eth0, countryName=DE, stateOrProvinceName=Hessen, localityName=Herborn, organizationName=Rittal GmbH, commonName=CMCIII (self-signed), 2022-08-23 10:50:42 - 2027-08-22 10:50:42')
uaclient.uaclient - INFO - Security Mode: MessageSecurityMode.SignAndEncrypt')
uaclient.uaclient - INFO - Security Policy URI: http://opcfoundation.org/UA/SecurityPolicy#Basic128Rsa15')
uaclient.uaclient - INFO - User policy: 0')
uaclient.uaclient - INFO - Token type: UserTokenType.Anonymous')
uaclient.uaclient - INFO - User policy: 1')
uaclient.uaclient - INFO - Token type: UserTokenType.UserName')
uaclient.uaclient - INFO - Security Policy URI: http://opcfoundation.org/UA/SecurityPolicy#Basic128Rsa15')
uaclient.uaclient - INFO - User policy: 2')
uaclient.uaclient - INFO - Token type: UserTokenType.Certificate')
uaclient.uaclient - INFO - Security Policy URI: http://opcfoundation.org/UA/SecurityPolicy#Basic128Rsa15')
uaclient.uaclient - INFO - Transport Profile URI: http://opcfoundation.org/UA-Profile/Transport/uatcp-uasc-uabinary')
uaclient.uaclient - INFO - Security Level: 0')
uaclient.uaclient - INFO - ')
uaclient.uaclient - INFO - Endpoint 3:')
uaclient.uaclient - INFO - Endpoint URL: opc.tcp://192.168.30.41:4840')
uaclient.uaclient - INFO - Application URI: urn:eth0:Rittal:CMC_III_UA_Server')
uaclient.uaclient - INFO - Product URI: http://www.rittal.com')
uaclient.uaclient - INFO - Application Name: LocalizedText(Locale='', Text='CMC III UA Server')')
uaclient.uaclient - INFO - Application Type: ApplicationType.Server')
uaclient.uaclient - INFO - Discovery URL: opc.tcp://eth0:4840')
uaclient.uaclient - INFO - Server Certificate: domainComponent=eth0, countryName=DE, stateOrProvinceName=Hessen, localityName=Herborn, organizationName=Rittal GmbH, commonName=CMCIII (self-signed), 2022-08-23 10:50:42 - 2027-08-22 10:50:42')
uaclient.uaclient - INFO - Security Mode: MessageSecurityMode.SignAndEncrypt')
uaclient.uaclient - INFO - Security Policy URI: http://opcfoundation.org/UA/SecurityPolicy#Basic256')
uaclient.uaclient - INFO - User policy: 0')
uaclient.uaclient - INFO - Token type: UserTokenType.Anonymous')
uaclient.uaclient - INFO - User policy: 1')
uaclient.uaclient - INFO - Token type: UserTokenType.UserName')
uaclient.uaclient - INFO - Security Policy URI: http://opcfoundation.org/UA/SecurityPolicy#Basic128Rsa15')
uaclient.uaclient - INFO - User policy: 2')
uaclient.uaclient - INFO - Token type: UserTokenType.Certificate')
uaclient.uaclient - INFO - Security Policy URI: http://opcfoundation.org/UA/SecurityPolicy#Basic128Rsa15')
uaclient.uaclient - INFO - Transport Profile URI: http://opcfoundation.org/UA-Profile/Transport/uatcp-uasc-uabinary')
uaclient.uaclient - INFO - Security Level: 0')
uaclient.uaclient - INFO - ')
uaclient.uaclient - INFO - Connecting to opc.tcp://192.168.30.41:4840 with parameters None_, None, , ')

UInteger = ua.Integer

asyncua.common.structures104 - ERROR - Failed to execute auto-generated code from UA datatype:
UInteger = ua.Integer
')
Traceback (most recent call last):
File "/home/aavs/Software/aavs-system/py3venv/python/lib/python3.8/site-packages/asyncua/common/structures104.py", line 394, in make_basetype_code
exec(code, env)
File "", line 2, in
AttributeError: module 'asyncua.ua' has no attribute 'Integer'
QObject::connect: Cannot queue arguments of type 'QTextCursor'
(Make sure 'QTextCursor' is registered using qRegisterMetaType().)
uaclient.mainwindow - WARNING - showing error: %s')
uawidgets.utils - ERROR - module 'asyncua.ua' has no attribute 'Integer'')
Traceback (most recent call last):
File "/home/aavs/Software/aavs-system/py3venv/python/lib/python3.8/site-packages/uawidgets/utils.py", line 21, in wrapper
result = func(self, *args)
File "/home/aavs/Software/aavs-system/py3venv/python/lib/python3.8/site-packages/uaclient/mainwindow.py", line 354, in connect
self.uaclient.connect(uri)
File "/home/aavs/Software/aavs-system/py3venv/python/lib/python3.8/site-packages/uaclient/uaclient.py", line 126, in connect
self.client.load_data_type_definitions()
File "/home/aavs/Software/aavs-system/py3venv/python/lib/python3.8/site-packages/asyncua/sync.py", line 94, in wrapper
result = self.tloop.post(aio_func(*args, **kwargs))
File "/home/aavs/Software/aavs-system/py3venv/python/lib/python3.8/site-packages/asyncua/sync.py", line 52, in post
return futur.result()
File "/usr/lib/python3.8/concurrent/futures/_base.py", line 444, in result
return self.__get_result()
File "/usr/lib/python3.8/concurrent/futures/_base.py", line 389, in __get_result
raise self._exception
File "/home/aavs/Software/aavs-system/py3venv/python/lib/python3.8/site-packages/asyncua/client/client.py", line 698, in load_data_type_definitions
return await load_data_type_definitions(self, node, overwrite_existing=overwrite_existing)
File "/home/aavs/Software/aavs-system/py3venv/python/lib/python3.8/site-packages/asyncua/common/structures104.py", line 416, in load_data_type_definitions
new_objects = await _load_base_datatypes(server) # we need to load all basedatatypes alias first
File "/home/aavs/Software/aavs-system/py3venv/python/lib/python3.8/site-packages/asyncua/common/structures104.py", line 407, in _load_base_datatypes
await _recursive_parse_basedatatypes(server, server.get_node(desc.NodeId), name, new_alias)
File "/home/aavs/Software/aavs-system/py3venv/python/lib/python3.8/site-packages/asyncua/common/structures104.py", line 379, in _recursive_parse_basedatatypes
await _recursive_parse_basedatatypes(server, server.get_node(desc.NodeId), name, new_alias)
File "/home/aavs/Software/aavs-system/py3venv/python/lib/python3.8/site-packages/asyncua/common/structures104.py", line 376, in _recursive_parse_basedatatypes
env = make_basetype_code(name, parent_datatype)
File "/home/aavs/Software/aavs-system/py3venv/python/lib/python3.8/site-packages/asyncua/common/structures104.py", line 394, in make_basetype_code
exec(code, env)
File "", line 2, in
AttributeError: module 'asyncua.ua' has no attribute 'Integer'
uaclient.mainwindow - WARNING - showing error: %s')
Disconnecting from server

@schroeder-
Copy link

you install my master branch not the pr try this:

pip install git+https://github.com/schroeder-/opcua-asyncio.git@add_integer_uinteger

@amattana
Copy link
Author

Got the same...

$ pip install git+https://github.com/schroeder-/opcua-asyncio.git@add_integer_uinteger
Collecting git+https://github.com/schroeder-/opcua-asyncio.git@add_integer_uinteger
Cloning https://github.com/schroeder-/opcua-asyncio.git (to revision add_integer_uinteger) to /tmp/pip-req-build-wjx240kt
Running command git clone --filter=blob:none --quiet https://github.com/schroeder-/opcua-asyncio.git /tmp/pip-req-build-wjx240kt
Running command git checkout -b add_integer_uinteger --track origin/add_integer_uinteger
Switched to a new branch 'add_integer_uinteger'
Branch 'add_integer_uinteger' set up to track remote branch 'add_integer_uinteger' from 'origin'.
Resolved https://github.com/schroeder-/opcua-asyncio.git to commit 1c369c981d1b13bd06063e686a04e2e4849ed45a
Preparing metadata (setup.py) ... done
Requirement already satisfied: aiofiles in ./Software/aavs-system/py3_venv/python/lib/python3.10/site-packages (from asyncua==0.9.95) (0.8.0)
Requirement already satisfied: aiosqlite in ./Software/aavs-system/py3_venv/python/lib/python3.10/site-packages (from asyncua==0.9.95) (0.17.0)
Requirement already satisfied: cryptography in ./Software/aavs-system/py3_venv/python/lib/python3.10/site-packages (from asyncua==0.9.95) (37.0.4)
Requirement already satisfied: python-dateutil in ./Software/aavs-system/py3_venv/python/lib/python3.10/site-packages (from asyncua==0.9.95) (2.8.2)
Requirement already satisfied: pytz in ./Software/aavs-system/py3_venv/python/lib/python3.10/site-packages (from asyncua==0.9.95) (2022.1)
Requirement already satisfied: sortedcontainers in ./Software/aavs-system/py3_venv/python/lib/python3.10/site-packages (from asyncua==0.9.95) (2.4.0)
Requirement already satisfied: typing_extensions>=3.7.2 in ./Software/aavs-system/py3_venv/python/lib/python3.10/site-packages (from aiosqlite->asyncua==0.9.95) (4.2.0)
Requirement already satisfied: cffi>=1.12 in ./Software/aavs-system/py3_venv/python/lib/python3.10/site-packages (from cryptography->asyncua==0.9.95) (1.15.1)
Requirement already satisfied: six>=1.5 in ./Software/aavs-system/py3_venv/python/lib/python3.10/site-packages (from python-dateutil->asyncua==0.9.95) (1.16.0)
Requirement already satisfied: pycparser in ./Software/aavs-system/py3_venv/python/lib/python3.10/site-packages (from cffi>=1.12->cryptography->asyncua==0.9.95) (2.21)
WARNING: You are using pip version 22.0.4; however, version 22.2.2 is available.
You should consider upgrading via the '/home/amattana/Software/aavs-system/py3_venv/python/bin/python3 -m pip install --upgrade pip' command.
(python) amattana@lambda:$ op
opcua-client open openssl openvpn openvt opldecode opt-14
(python) amattana@lambda:
$ opcua-client
pyqtgraph or numpy are not installed, use of graph feature disabled
ADR ['opc.tcp://localhost:4840', 'opc.tcp://localhost:53530/OPCUA/SimulationServer/']
uaclient.uaclient - INFO - Endpoint 1:')
uaclient.uaclient - INFO - Endpoint URL: opc.tcp://192.168.30.41:4840')
uaclient.uaclient - INFO - Application URI: urn:eth0:Rittal:CMC_III_UA_Server')
uaclient.uaclient - INFO - Product URI: http://www.rittal.com')
uaclient.uaclient - INFO - Application Name: LocalizedText(Locale='', Text='CMC III UA Server')')
uaclient.uaclient - INFO - Application Type: ApplicationType.Server')
uaclient.uaclient - INFO - Discovery URL: opc.tcp://eth0:4840')
uaclient.uaclient - INFO - Server Certificate: domainComponent=eth0, countryName=DE, stateOrProvinceName=Hessen, localityName=Herborn, organizationName=Rittal GmbH, commonName=CMCIII (self-signed), 2022-08-23 10:50:42 - 2027-08-22 10:50:42')
uaclient.uaclient - INFO - Security Mode: MessageSecurityMode.None_')
uaclient.uaclient - INFO - Security Policy URI: http://opcfoundation.org/UA/SecurityPolicy#None')
uaclient.uaclient - INFO - User policy: 0')
uaclient.uaclient - INFO - Token type: UserTokenType.Anonymous')
uaclient.uaclient - INFO - User policy: 1')
uaclient.uaclient - INFO - Token type: UserTokenType.UserName')
uaclient.uaclient - INFO - Security Policy URI: http://opcfoundation.org/UA/SecurityPolicy#Basic128Rsa15')
uaclient.uaclient - INFO - User policy: 2')
uaclient.uaclient - INFO - Token type: UserTokenType.Certificate')
uaclient.uaclient - INFO - Security Policy URI: http://opcfoundation.org/UA/SecurityPolicy#Basic128Rsa15')
uaclient.uaclient - INFO - Transport Profile URI: http://opcfoundation.org/UA-Profile/Transport/uatcp-uasc-uabinary')
uaclient.uaclient - INFO - Security Level: 0')
uaclient.uaclient - INFO - ')
uaclient.uaclient - INFO - Endpoint 2:')
uaclient.uaclient - INFO - Endpoint URL: opc.tcp://192.168.30.41:4840')
uaclient.uaclient - INFO - Application URI: urn:eth0:Rittal:CMC_III_UA_Server')
uaclient.uaclient - INFO - Product URI: http://www.rittal.com')
uaclient.uaclient - INFO - Application Name: LocalizedText(Locale='', Text='CMC III UA Server')')
uaclient.uaclient - INFO - Application Type: ApplicationType.Server')
uaclient.uaclient - INFO - Discovery URL: opc.tcp://eth0:4840')
uaclient.uaclient - INFO - Server Certificate: domainComponent=eth0, countryName=DE, stateOrProvinceName=Hessen, localityName=Herborn, organizationName=Rittal GmbH, commonName=CMCIII (self-signed), 2022-08-23 10:50:42 - 2027-08-22 10:50:42')
uaclient.uaclient - INFO - Security Mode: MessageSecurityMode.SignAndEncrypt')
uaclient.uaclient - INFO - Security Policy URI: http://opcfoundation.org/UA/SecurityPolicy#Basic128Rsa15')
uaclient.uaclient - INFO - User policy: 0')
uaclient.uaclient - INFO - Token type: UserTokenType.Anonymous')
uaclient.uaclient - INFO - User policy: 1')
uaclient.uaclient - INFO - Token type: UserTokenType.UserName')
uaclient.uaclient - INFO - Security Policy URI: http://opcfoundation.org/UA/SecurityPolicy#Basic128Rsa15')
uaclient.uaclient - INFO - User policy: 2')
uaclient.uaclient - INFO - Token type: UserTokenType.Certificate')
uaclient.uaclient - INFO - Security Policy URI: http://opcfoundation.org/UA/SecurityPolicy#Basic128Rsa15')
uaclient.uaclient - INFO - Transport Profile URI: http://opcfoundation.org/UA-Profile/Transport/uatcp-uasc-uabinary')
uaclient.uaclient - INFO - Security Level: 0')
uaclient.uaclient - INFO - ')
uaclient.uaclient - INFO - Endpoint 3:')
uaclient.uaclient - INFO - Endpoint URL: opc.tcp://192.168.30.41:4840')
uaclient.uaclient - INFO - Application URI: urn:eth0:Rittal:CMC_III_UA_Server')
uaclient.uaclient - INFO - Product URI: http://www.rittal.com')
uaclient.uaclient - INFO - Application Name: LocalizedText(Locale='', Text='CMC III UA Server')')
uaclient.uaclient - INFO - Application Type: ApplicationType.Server')
uaclient.uaclient - INFO - Discovery URL: opc.tcp://eth0:4840')
uaclient.uaclient - INFO - Server Certificate: domainComponent=eth0, countryName=DE, stateOrProvinceName=Hessen, localityName=Herborn, organizationName=Rittal GmbH, commonName=CMCIII (self-signed), 2022-08-23 10:50:42 - 2027-08-22 10:50:42')
uaclient.uaclient - INFO - Security Mode: MessageSecurityMode.SignAndEncrypt')
uaclient.uaclient - INFO - Security Policy URI: http://opcfoundation.org/UA/SecurityPolicy#Basic256')
uaclient.uaclient - INFO - User policy: 0')
uaclient.uaclient - INFO - Token type: UserTokenType.Anonymous')
uaclient.uaclient - INFO - User policy: 1')
uaclient.uaclient - INFO - Token type: UserTokenType.UserName')
uaclient.uaclient - INFO - Security Policy URI: http://opcfoundation.org/UA/SecurityPolicy#Basic128Rsa15')
uaclient.uaclient - INFO - User policy: 2')
uaclient.uaclient - INFO - Token type: UserTokenType.Certificate')
uaclient.uaclient - INFO - Security Policy URI: http://opcfoundation.org/UA/SecurityPolicy#Basic128Rsa15')
uaclient.uaclient - INFO - Transport Profile URI: http://opcfoundation.org/UA-Profile/Transport/uatcp-uasc-uabinary')
uaclient.uaclient - INFO - Security Level: 0')
uaclient.uaclient - INFO - ')
uaclient.uaclient - INFO - Connecting to opc.tcp://192.168.30.41:4840 with parameters None_, None, , ')

UInteger = ua.Integer

asyncua.common.structures104 - ERROR - Failed to execute auto-generated code from UA datatype:
UInteger = ua.Integer
')
Traceback (most recent call last):
File "/home/amattana/Software/aavs-system/py3_venv/python/lib/python3.10/site-packages/asyncua/common/structures104.py", line 394, in make_basetype_code
exec(code, env)
File "", line 2, in
AttributeError: module 'asyncua.ua' has no attribute 'Integer'
QObject::connect: Cannot queue arguments of type 'QTextCursor'
(Make sure 'QTextCursor' is registered using qRegisterMetaType().)
uaclient.mainwindow - WARNING - showing error: %s')
uawidgets.utils - ERROR - module 'asyncua.ua' has no attribute 'Integer'')
Traceback (most recent call last):
File "/home/amattana/Software/aavs-system/py3_venv/python/lib/python3.10/site-packages/uawidgets/utils.py", line 21, in wrapper
result = func(self, *args)
File "/home/amattana/Software/aavs-system/py3_venv/python/lib/python3.10/site-packages/uaclient/mainwindow.py", line 354, in connect
self.uaclient.connect(uri)
File "/home/amattana/Software/aavs-system/py3_venv/python/lib/python3.10/site-packages/uaclient/uaclient.py", line 126, in connect
self.client.load_data_type_definitions()
File "/home/amattana/Software/aavs-system/py3_venv/python/lib/python3.10/site-packages/asyncua/sync.py", line 94, in wrapper
result = self.tloop.post(aio_func(*args, **kwargs))
File "/home/amattana/Software/aavs-system/py3_venv/python/lib/python3.10/site-packages/asyncua/sync.py", line 52, in post
return futur.result()
File "/usr/lib/python3.10/concurrent/futures/_base.py", line 446, in result
return self.__get_result()
File "/usr/lib/python3.10/concurrent/futures/_base.py", line 391, in __get_result
raise self._exception
File "/home/amattana/Software/aavs-system/py3_venv/python/lib/python3.10/site-packages/asyncua/client/client.py", line 698, in load_data_type_definitions
return await load_data_type_definitions(self, node, overwrite_existing=overwrite_existing)
File "/home/amattana/Software/aavs-system/py3_venv/python/lib/python3.10/site-packages/asyncua/common/structures104.py", line 416, in load_data_type_definitions
new_objects = await _load_base_datatypes(server) # we need to load all basedatatypes alias first
File "/home/amattana/Software/aavs-system/py3_venv/python/lib/python3.10/site-packages/asyncua/common/structures104.py", line 407, in _load_base_datatypes
await _recursive_parse_basedatatypes(server, server.get_node(desc.NodeId), name, new_alias)
File "/home/amattana/Software/aavs-system/py3_venv/python/lib/python3.10/site-packages/asyncua/common/structures104.py", line 379, in _recursive_parse_basedatatypes
await _recursive_parse_basedatatypes(server, server.get_node(desc.NodeId), name, new_alias)
File "/home/amattana/Software/aavs-system/py3_venv/python/lib/python3.10/site-packages/asyncua/common/structures104.py", line 376, in _recursive_parse_basedatatypes
env = make_basetype_code(name, parent_datatype)
File "/home/amattana/Software/aavs-system/py3_venv/python/lib/python3.10/site-packages/asyncua/common/structures104.py", line 394, in make_basetype_code
exec(code, env)
File "", line 2, in
AttributeError: module 'asyncua.ua' has no attribute 'Integer'
uaclient.mainwindow - WARNING - showing error: %s')
Disconnecting from server

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants