plt-tud / opc_ua_xml_export_client

OPC UA Node XML export client
GNU General Public License v3.0
22 stars 14 forks source link

XML export can not build etree #1

Closed sntspyridon closed 1 year ago

sntspyridon commented 4 years ago

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

sntspyridon commented 4 years 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.

JohannesM24 commented 3 years ago

I am getting this error aswell. Any fix?

sntspyridon commented 3 years ago

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.

ruudsieb commented 2 years ago

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.

piperoc commented 1 year ago

@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.

ruudsieb commented 1 year ago

@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! 😊

sheinze commented 1 year ago

Hey @ruudsieb , thank you so much for your effort. I just pulled the changes into the main repo.

sheinze commented 1 year ago

Tested with with several servers. Error of @sntspyridon does not show anymore. If it happens again please open a new issue.