-
Notifications
You must be signed in to change notification settings - Fork 664
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
server.import_xml leading to BadParentNodeIdInvalid #715
Comments
Not being able to import NodeSet2 is completely normal. It is already imported. Concerning the other one either it is a bug or it requires another nodeset before |
Thanks for clarifying regarding NodeSet2. How would I import Opc.Ua.Fdi5.NodeSet2.xml? In SiOME I would first import Opc.Ua.Di.NodeSet2.xml and then Opc.Ua.Fdi5.NodeSet2.xml. When I do:
I'm getting: Di.NodeSet2 is built on top of NodeSet2. Fdi5.Nodeset2 is built on top of Di.NodeSet2. Is there a different method for importing multiple xmls? |
the code above is correct, might be a bug in importer.... you are welcome to try to find out. Unfortumately the code is hard to understand...If someone has ideas to improve it , it would be great... |
Hallo @NNTin, Did you find any solution for this so far? |
BadNodeExist is clearly an issue with your setup or the XML file itself, not python-opcua code |
My error code was different. The solution to my error was to import both models into SiOME and then export it as a single xml file. I don't know if this solves your problem. Best of luck! edit:
As in I didn't need to import NodeSet2. |
I just found and fixed two bugs in apcua-asyncio. they should be backported to python-opcua FreeOpcUa/opcua-asyncio@4b85a3f Can someone do it? |
BUT we now add a default reference type when no reference type is specified. I have no idea what the defalt should be. I used HasComponent, it might be wrong... |
Hello guys, I am also getting the same error as yours : raise UaStatusCodeError(self.value) i am trying to import all these files. custom_nodeset.xml was created using siemens SiOME modelling editor. here is the code : import opcuaimport timefrom opcua import Serverimport randomclass OPCServer:def init(self) :self.server = Server()def start(self):self.server.set_server_name("OPC UA Server")self.server.set_endpoint("opc.tcp://192.168.0.107:4140")#self.server.import_xml("Opc.Ua.Di.Nodeset2.xml")#self.server.import_xml("Opc.Ua.Machinery.Nodeset2.xml")#self.server.import_xml("Opc.Ua.Pumps.Nodeset2.xml")self.server.import_xml("custom_nodeset.xml")self.server.start()if name == 'main':server = OPCServer()server.start()#server.run()How did you guys solve this error? |
See #1475 . Switch to asyncua |
i tried but the error remain same |
the error tells you that the parent already exist! the nodeset ia already part of the default addreassspace. edit: you should use asyncua instead of this repo its depricated! |
I took the server-minmal.py example and added the following line between line 12 and 13:
server.import_xml("absolute-path-of-my-xml-file.xml")
It works when importing Opc.Ua.Di.NodeSet2.xml.
But when I import Opc.Ua.Fdi5.NodeSet2.xml I am getting the following error:
When I remove the troubling node from the xml the error changes to:
failure adding node NodeData(nodeid:NumericNodeId(ns=1;i=2))
When removing that again it changes to:
failure adding node NodeData(nodeid:NumericNodeId(ns=1;i=92))
and so on.
When I import Opc.Ua.NodeSet2.xml I am getting the following error:
I've been trying to figure out how I can import those xml files. I'm glad over any help.
The text was updated successfully, but these errors were encountered: