Closed sntspyridon closed 1 year ago
The problem is that, it raises an exception for every description that is missing, so i changed a definition in the opcua.common....node.py file
the def get_attribute(self, attr): result[0].statuscode.isgood() <--- this line
isgood() will not raise an exception.
I am getting this error aswell. Any fix?
I dont remeber anymore. I think i edited the xml export python scritp to ignore some errors, than it was fine
From: JohannesM24 notifications@github.com Sent: Monday, November 23, 2020 11:28:48 AM To: plt-tud/opc_ua_xml_export_client opc_ua_xml_export_client@noreply.github.com Cc: sntspyridon jan.kovic@outlook.com; Author author@noreply.github.com Subject: Re: [plt-tud/opc_ua_xml_export_client] XML export can not build etree (#1)
I am getting this error aswell. Any fix?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/plt-tud/opc_ua_xml_export_client/issues/1#issuecomment-732069988, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AOUMYUHDY7X62IXE4VDFIRDSRI2OBANCNFSM4LXC2WDA.
The problem is in the opcua module. It is trying to retrieve attributes from the server which are not present.
In my case Description
and ArrayDimensions
. It will cause incomplete output if it is not fixed. I fixed it by simply catching and ignoring the exceptions in xmlexporter.py
of module opcua
.
@ruudsieb I saw your fix in the client export fork. While it takes care of those attributes, it still won't work for things like methods arguments and stuff (for example, you caught a couple of issues in your #FIXME comments). Unfortunately, I did not find a way to open issues on your project opc_ua_xml_export_client which I think it's a great effort. Overall, the xmlexporter seems pretty shaky and probably needs more testing.
I wonder if anyone else has tried the feature in the last couple of years.
@piperoc You're right, actually I adopted the exporter so it works for my use case. But it would definitely need more work. I didn't realize other people are also interested, but nice to hear I'm not alone. Anyway I enabled the possibility to add issues, and discussions. So go ahead! 😊
Hey @ruudsieb , thank you so much for your effort. I just pulled the changes into the main repo.
Tested with with several servers. Error of @sntspyridon does not show anymore. If it happens again please open a new issue.
Hello,
I am trying to export a server adressSpace, and when i am exporting, this error occuress on multiple nodes and it does not write them to xml file.
WARNING:opcua.common.xmlexporter:Error building etree for node Node(StringNodeId(ns=4;s=MotionDeviceSystem)): The attribute is not supported for the specified Node.(BadAttributeIdInvalid)
Would you mind helping me ?
Thank you