BadParentNodeIdInvalid when importing FDI nodeset #1266
-
Hi, Parsing value of type 'QualifiedName' not implemented
failure adding node NodeData(nodeid:NumericNodeId(ns=1;i=92))
"The parent node id does not to refer to a valid node."(BadParentNodeIdInvalid)
Stapelüberwachung:
> File "C:\Users\simon\projects\server\FDITest\FDITest\FDITest.py", line 28, in <module>
> server.import_xml("ua-nodesets/FDI/Opc.Ua.Fdi5.NodeSet2.xml")
"__main__" geladen
"runpy" geladen
Traceback (most recent call last):
File "C:\Program Files\Python37\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "C:\Program Files\Python37\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "c:\program files (x86)\microsoft visual studio\2019\community\common7\ide\extensions\microsoft\python\core\debugpy\__main__.py", line 45, in <module>
cli.main()
File "c:\program files (x86)\microsoft visual studio\2019\community\common7\ide\extensions\microsoft\python\core\debugpy/..\debugpy\server\cli.py", line 430, in main
run()
File "c:\program files (x86)\microsoft visual studio\2019\community\common7\ide\extensions\microsoft\python\core\debugpy/..\debugpy\server\cli.py", line 267, in run_file
runpy.run_path(options.target, run_name=compat.force_str("__main__"))
File "C:\Program Files\Python37\lib\runpy.py", line 263, in run_path
Der Thread 'MainThread' (0x1) hat mit Code 0 (0x0) geendet.
pkg_name=pkg_name, script_name=fname)
File "C:\Program Files\Python37\lib\runpy.py", line 96, in _run_module_code
mod_name, mod_spec, pkg_name, script_name)
File "C:\Program Files\Python37\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\simon\projects\server\FDITest\FDITest\FDITest.py", line 28, in <module>
server.import_xml("ua-nodesets/FDI/Opc.Ua.Fdi5.NodeSet2.xml")
File "C:\Users\simon\AppData\Roaming\Python\Python37\site-packages\opcua\server\server.py", line 510, in import_xml
return importer.import_xml(path, xmlstring)
File "C:\Users\simon\AppData\Roaming\Python\Python37\site-packages\opcua\common\xmlimporter.py", line 67, in import_xml
node = self._add_node_data(nodedata)
File "C:\Users\simon\AppData\Roaming\Python\Python37\site-packages\opcua\common\xmlimporter.py", line 94, in _add_node_data
node = self.add_method(nodedata)
File "C:\Users\simon\AppData\Roaming\Python\Python37\site-packages\opcua\common\xmlimporter.py", line 360, in add_method
res[0].StatusCode.check()
File "C:\Users\simon\AppData\Roaming\Python\Python37\site-packages\opcua\ua\uatypes.py", line 218, in check
raise UaStatusCodeError(self.value)
opcua.ua.uaerrors._auto.BadParentNodeIdInvalid: "The parent node id does not to refer to a valid node."(BadParentNodeIdInvalid) To Reproduce
Additional Info Version |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
I have faced a similar issue. The below lines are from the xml that I use to import. UAVariable NodeId="ns=1;i=4002" BrowseName="1:Tag1999" ParentNodeID="i=85" DataType="Float" AccessLevel="3" UserAccessLevel="3"> I noticed that I get "Bad parent ID ..." error mostly because of the typing mistake. I resolved by correcting at 2 places in my xml
I hope this helps Tha |
Beta Was this translation helpful? Give feedback.
-
We had some issues in opcua-asyncio, which is the main repo, since this is in maintainance mode, where such kind of issues should be cleared. |
Beta Was this translation helpful? Give feedback.
We had some issues in opcua-asyncio, which is the main repo, since this is in maintainance mode, where such kind of issues should be cleared.
There was an issue with missing nodes in the UA set (since the part.xml files shouldn't be used anymore), problems with the addresspace (identical browsenames on same hierarchy level), up to missing- and unchecked (version dependencies) Nodes and references with the xml importer.
I recommened you to switch to the newer project. Depending on my timeschedule I may provide a PR for that (but not in near future).